From patchwork Fri Jan 19 10:45:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13523590 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 AD8E2C47DAF for ; Fri, 19 Jan 2024 10:47:01 +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=yqfKcpO5zsZXS+GReM9eMKM7fv46DwUEByyXLbq7g/w=; b=hSkZHU0tcAVY+c 7ppL0Q/+KqQ59cKhQ5ni3HnMsIv3UH/WmN5bbeT/ii0mo8eccRQejE/xN1rtZvZfkO39RTdHSTcX9 LliMTSIqBQEMaooHyzvpIYV7vkyHPuk1pvY3qLwWYi2jjp/1mhssMiKdZv9J1vtzfauXchz+BtqaV CR8DqJ0XtT7DHpu/6VyAheKxmpSAZAvDum7q9DmEcuRONrq4wgcosH3wUjI/2XxTB4otKom7RqPgc DTPypugJc4qvSKFvqsbf7cFGiUUZzXtGpmrWHiahhQ3mluvWG7dn+FzlD74TWpZGnOxhTW3Ifu9Fa 1rapiRrJaDEYlgTQ9q3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQmOQ-00583B-2O; Fri, 19 Jan 2024 10:46:34 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQmNc-0057NC-2B for linux-arm-kernel@lists.infradead.org; Fri, 19 Jan 2024 10:45:45 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e60e137aaso6723915e9.0 for ; Fri, 19 Jan 2024 02:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705661143; x=1706265943; 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=Xja7r4IqoFurQHPVGT/1DVUThNq/9DBjzzyZqX4X0B8=; b=CtncIbZJrDWxao8Dhl0Bn5kC0vvusIIXQJk4fX0D5qnjHzR/9EnBbknMCmZWjT6hwF cCDCV6eqxlBF/DIqzTm9tZoRgTRXJSOI2sl4UGiBnwAAMm9u1SpU3c8Mj1CgG1IqQz5a 8ql9v03hawiA20VGDyqP1RXtBfPOneiaad0F7sVPRn67NUWtoHq9p5MmxAK6puo3AYC5 WBxHhwPalKLTu/CJKsKVKPU3rrqT/H5n9xYnLhbSkQS1YjmmBuiH1AwO6dOYN6jkOU17 t+ukPbccis5diZJXHBZPGCbhveI9TnNu0zFUallgApqtVOGPTra0hU1nc0aR8OxD2ktl jvWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705661143; x=1706265943; 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=Xja7r4IqoFurQHPVGT/1DVUThNq/9DBjzzyZqX4X0B8=; b=uNMwjk/eP5DLBvAkhMCpXMNHvl2WS5amarKy7ORNTmVNMGN3m0R7bBjwSfYTVoflEh y0EnXWe1cfdP2vraexA/BnDDZvRwad8IpZEJQhYj/NvTU2pP4zZzyI0RFFyPKUqpD/EC xoIolPj/mzW7UhTWJSRAEit6nLgz+qEgIXzzaH7yjeD/Lu2XL92+DQV/AkC8T9OZNBpG /B/JiidwcMa9QkQp3dwQqst4bdFj8TgmAwlhTKoUg2YftAPCUn2zS9YAwggn5DeZFtlJ 5GB0pSJL1DP+BG2xVr64dIhwJZyLHBpaY8WvALDIw79ZlCxwKp1up2H4HJNxeEf/fKcw MexQ== X-Gm-Message-State: AOJu0Yy0KNnFUaMBiFt4kBAGq/gJsLryLT4L61uBEAW449N843vOr1C4 FXisMbxv/yMILsrRnPUK9CGh1De0ZDMF7d9tMcHpsNA4abd588AaQc5aRAslesc= X-Google-Smtp-Source: AGHT+IH2PpdF1uUhaQRfj7t0SInB7+ZgNuwheiqs3dl7+iJuzGY08czS9RbIuf9b+VH9MlmAEuFIsA== X-Received: by 2002:a05:600c:4ab0:b0:40e:37dc:2dd5 with SMTP id b48-20020a05600c4ab000b0040e37dc2dd5mr1306935wmp.135.1705661143501; Fri, 19 Jan 2024 02:45:43 -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 fm16-20020a05600c0c1000b0040ea10178f3sm77470wmb.21.2024.01.19.02.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 02:45:42 -0800 (PST) From: Tudor Ambarus To: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, andre.draszik@linaro.org, kernel-team@android.com, peter.griffin@linaro.org, semen.protsenko@linaro.org, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v2 15/19] tty: serial: samsung: return bool for s3c24xx_serial_console_txrdy() Date: Fri, 19 Jan 2024 10:45:22 +0000 Message-ID: <20240119104526.1221243-16-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240119104526.1221243-1-tudor.ambarus@linaro.org> References: <20240119104526.1221243-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-20240119_024544_714587_E6A68225 X-CRM114-Status: GOOD ( 12.56 ) 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. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- 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 90d697def5c7..bdc81ab4af91 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2184,7 +2184,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); @@ -2194,13 +2194,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