Re: [PATCH v1 3/4] serial: exar: remove unneeded parenthesis

From: Jiri Slaby
Date: Fri Apr 19 2024 - 03:01:40 EST


On 19. 04. 24, 8:58, Greg Kroah-Hartman wrote:
On Thu, Apr 18, 2024 at 11:36:30AM -0400, Parker Newman wrote:
From: Parker Newman <pnewman@xxxxxxxxxxxxxxx>

Remove unneeded parenthesis from several locations.

Based on feedback from:
Link: https://lore.kernel.org/linux-serial/f2353b8c-2079-b895-2707-f6be83161288@xxxxxxxxxxxxxxx

Signed-off-by: Parker Newman <pnewman@xxxxxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250_exar.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 01748ddbf729..10725ad0f3ef 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -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 ? 1 : 0;

Again, spell out the ? : stuff here please. Using () isn't the problem :)

Could this in fact be inline bool exar_is_ee_set() (or alike) and return that regb & UART_EXAR_REGB_EEDO directly (w/o using ternary at all)?

thanks,
--
js
suse labs