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; } /** @@ -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; } -- 2.43.2