[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf67865525b30f58dbc8fbbe13865f73b5377c2f.1713533298.git.pnewman@connecttech.com>
Date: Fri, 19 Apr 2024 10:17:03 -0400
From: Parker Newman <parker@...est.io>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Parker Newman <pnewman@...necttech.com>
Subject: [PATCH v2 3/4] serial: exar: return bool from exar_ee_read_bit()
From: Parker Newman <pnewman@...necttech.com>
Change exar_ee_read_bit() to return a bool instead of u8. Removed need
for ternary or if/else for return value.
Signed-off-by: Parker Newman <pnewman@...necttech.com>
---
Changes in v2:
- Change exar_ee_read_bit() to return a bool
drivers/tty/serial/8250/8250_exar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 01748ddbf729..8665d3b7b673 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -300,7 +300,7 @@ static inline void exar_ee_write_bit(struct exar8250 *priv, int bit)
udelay(2);
}
-static inline u8 exar_ee_read_bit(struct exar8250 *priv)
+static inline bool exar_ee_read_bit(struct exar8250 *priv)
{
u8 regb;
u8 value = UART_EXAR_REGB_EECS;
@@ -317,7 +317,7 @@ static inline u8 exar_ee_read_bit(struct exar8250 *priv)
regb = exar_read_reg(priv, UART_EXAR_REGB);
- return (regb & UART_EXAR_REGB_EEDO ? 1 : 0);
+ return regb & UART_EXAR_REGB_EEDO;
}
/**
--
2.43.2
Powered by blists - more mailing lists