From patchwork Wed Jan 10 10:20:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13515907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AE07C3DA6E for ; Wed, 10 Jan 2024 10:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zb2Tb6Lis4houSHuROuc7kR6msaeFvc3F1ao1SAbqG8=; b=EacuW4b3kv+7oy W5pz73wojgtMxUVHubzJgaD5xSqXTIsuxEebQBKVBPrsUDVo9FZRgLgm4kdOk/4hXPDHjh3/nTMwm RNM3QWyHCo1nOWIciEKr5Ff6LXz08xGDx6t3qfyoSOZDCKSRtTQLrboKjjl6+a0tO2N8ImUctQ6WE VW+4ZWs4uwcp/phCBIrlFYcD2jcjvn/vUuO++rHW+PwfnzmHRGEP9GvXUFXnkObOucwU5dvYGi7yr iGjTwU9b/an6eyT0kxqQFlhs8waFfpY1NOzFvpcuvGOhoLaYSNNqMEjDXJrN0qHSwWgg3tQL7Stdw XnPZQu+JI6j3ZpTB2BKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNViY-00B0UY-1y; Wed, 10 Jan 2024 10:21:50 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNVi5-00B03l-0Z for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2024 10:21:23 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e461c1f44so34903625e9.3 for ; Wed, 10 Jan 2024 02:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882079; x=1705486879; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UmHRPW27RDnkA+g75aUBVezswJMsnzKsK+kYqojzJWA=; b=mtuu8koAm/YdIOpJxjXQUhbxtcNo4LU4vjjQBJN8k/IG4RVGweEyHfvNEcDx8MgUme e/xsYaI838k85HYiLPKitHPPD3rzYDEIbKgo/af22qFcIfpmd5tRMOP0Xm4RF1KAqwps I30vVQCZTWN1f8/NAhaVexf9BIKhU2jLAWdPcecS497VXaqgKNkgMD+QbvoE2GfddAny qQS0fO7B+h1bqKrQ3y29hRzr/db4oTVuYOwN5hakeQLcuBvKriQ3V6w97e22m35uR0qa NSkviKBYE2EuIfo4QgEaDTSl7vufVYS5Q994cxiYBJ/bXKhwH8I8FF6ZwyqKUDIb7ODO f0Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882079; x=1705486879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UmHRPW27RDnkA+g75aUBVezswJMsnzKsK+kYqojzJWA=; b=UKVEWh9ldOPwmaftjaqDywhKZ9xX3UfpwnMcRkRsLRSMf5VGEfs/Abu3KFBAsp/xy7 FxEwidipOZF2YycNVmqNoAnHGvtb0pPOCdHpvz0VydYHPuxAC8RKRG+IR0yo0QXhpytj bSlTfAGip4i+jYuvQTw0KnTYRSaO7GqUOXfDdirfgP0bBtk4TejOND7FFTGQmOlzEn10 xsODOfqlHdfuJ2vtg000D6lNuSs/G37JdFSvOpFmXn+UQmBSdm/4+TtN+Pr/zAN+tMBj 0epXRd41f7WY9BCQTQaFhB8FfEx+ZOeAn9aQ02wsCwhY+WMHFChgbkNkn+sy5O/PKALV Jlqw== X-Gm-Message-State: AOJu0Yx9D1w29VlNXmNx0z6Exef8BMdlF082i6T0RG1brZa1FQ+tEmJh xuB0vY6QI4btITqD+AmCn5f3CEGJViPwuw== X-Google-Smtp-Source: AGHT+IF+Oagp4pVfoPn3Qez+PCLQ0H1IzVpFxNqvHn3qcWSqeS9VWnZ6GpgOzUfsQ+2xzQchsRL06w== X-Received: by 2002:a05:600c:45c6:b0:40d:932b:c4eb with SMTP id s6-20020a05600c45c600b0040d932bc4ebmr405924wmo.176.1704882078926; Wed, 10 Jan 2024 02:21:18 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:18 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 14/18] tty: serial: samsung: return bool for s3c24xx_serial_console_txrdy() Date: Wed, 10 Jan 2024 10:20:58 +0000 Message-ID: <20240110102102.61587-15-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240110_022121_251439_CCBAAC51 X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org s3c24xx_serial_console_txrdy() returned just 0 or 1 to indicate whether the TX is empty or not. Change its return type to bool. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 63e993bed296..37c0ba2a122c 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2183,7 +2183,7 @@ static const struct dev_pm_ops s3c24xx_serial_pm_ops = { static struct uart_port *cons_uart; -static int +static bool s3c24xx_serial_console_txrdy(struct uart_port *port, u32 ufcon) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); @@ -2193,13 +2193,13 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, u32 ufcon) /* fifo mode - check amount of data in fifo registers... */ ufstat = rd_regl(port, S3C2410_UFSTAT); - return (ufstat & info->tx_fifofull) ? 0 : 1; + return !(ufstat & info->tx_fifofull); } /* in non-fifo mode, we go and use the tx buffer empty */ utrstat = rd_regl(port, S3C2410_UTRSTAT); - return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0; + return !!(utrstat & S3C2410_UTRSTAT_TXE); } static bool