diff mbox series

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

Message ID 1dbe1847d92dd34d223c6dc6b5cd0731b78e98e5.1713452766.git.pnewman@connecttech.com
State New
Headers show
Series serial: exar: fix kbuild warnings and code style | expand

Commit Message

Parker Newman April 18, 2024, 3:36 p.m. UTC
From: Parker Newman <pnewman@connecttech.com>

Remove unneeded parenthesis from several locations.

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

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

--
2.43.2
diff mbox series

Patch

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;
 }

 /**
@@ -741,18 +741,18 @@  static enum cti_port_type cti_get_port_type_xr17c15x_xr17v25x(struct exar8250 *p
 		break;
 	// 1x RS232, 1x RS422/RS485
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1:
-		port_type = (port_num == 0) ?
+		port_type = port_num == 0 ?
 			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
 		break;
 	// 2x RS232, 2x RS422/RS485
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2:
-		port_type = (port_num < 2) ?
+		port_type = port_num < 2 ?
 			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
 		break;
 	// 4x RS232, 4x RS422/RS485
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4:
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4_SP:
-		port_type = (port_num < 4) ?
+		port_type = port_num < 4 ?
 			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
 		break;
 	// RS232/RS422/RS485 HW (jumper) selectable
@@ -789,12 +789,12 @@  static enum cti_port_type cti_get_port_type_xr17c15x_xr17v25x(struct exar8250 *p
 		break;
 	// 6x RS232, 2x RS422/RS485
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_6_2_SP:
-		port_type = (port_num < 6) ?
+		port_type = port_num < 6 ?
 			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
 		break;
 	// 2x RS232, 6x RS422/RS485
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_6_SP:
-		port_type = (port_num < 2) ?
+		port_type = port_num < 2 ?
 			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
 		break;
 	default:
@@ -981,10 +981,10 @@  static int cti_port_setup_xr17v35x(struct exar8250 *priv,
 	if (ret)
 		return ret;

-	exar_write_reg(priv, (offset + UART_EXAR_8XMODE), 0x00);
-	exar_write_reg(priv, (offset + UART_EXAR_FCTR), UART_FCTR_EXAR_TRGD);
-	exar_write_reg(priv, (offset + UART_EXAR_TXTRG), 128);
-	exar_write_reg(priv, (offset + UART_EXAR_RXTRG), 128);
+	exar_write_reg(priv, offset + UART_EXAR_8XMODE, 0x00);
+	exar_write_reg(priv, offset + UART_EXAR_FCTR, UART_FCTR_EXAR_TRGD);
+	exar_write_reg(priv, offset + UART_EXAR_TXTRG, 128);
+	exar_write_reg(priv, offset + UART_EXAR_RXTRG, 128);

 	return 0;
 }
@@ -1037,10 +1037,10 @@  static int cti_port_setup_xr17v25x(struct exar8250 *priv,
 	if (ret)
 		return ret;

-	exar_write_reg(priv, (offset + UART_EXAR_8XMODE), 0x00);
-	exar_write_reg(priv, (offset + UART_EXAR_FCTR), UART_FCTR_EXAR_TRGD);
-	exar_write_reg(priv, (offset + UART_EXAR_TXTRG), 32);
-	exar_write_reg(priv, (offset + UART_EXAR_RXTRG), 32);
+	exar_write_reg(priv, offset + UART_EXAR_8XMODE, 0x00);
+	exar_write_reg(priv, offset + UART_EXAR_FCTR, UART_FCTR_EXAR_TRGD);
+	exar_write_reg(priv, offset + UART_EXAR_TXTRG, 32);
+	exar_write_reg(priv, offset + UART_EXAR_RXTRG, 32);

 	return 0;
 }