diff mbox series

[v1,4/4] serial: exar: change port_type ternary line wrapping

Message ID 0081b6a7bbe1ad6ce114132f9ee86677a761de6d.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>

Change line wrapping of ternary operators in
cti_get_port_type_xr17c15x_xr17v25x() for better readability.

Old example:

	port_type = port_num == 0 ?
			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;

New:
	port_type = port_num == 0 ? CTI_PORT_TYPE_RS232 :
				CTI_PORT_TYPE_RS422_485;

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 | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 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 10725ad0f3ef..a76b4e5bab4e 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -741,19 +741,19 @@  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 ?
-			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
+		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 ?
-			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
+		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 ?
-			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
+		port_type = port_num < 4 ? CTI_PORT_TYPE_RS232 :
+					CTI_PORT_TYPE_RS422_485;
 		break;
 	// RS232/RS422/RS485 HW (jumper) selectable
 	case PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2:
@@ -789,13 +789,13 @@  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 ?
-			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
+		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 ?
-			CTI_PORT_TYPE_RS232 : CTI_PORT_TYPE_RS422_485;
+		port_type = port_num < 2 ? CTI_PORT_TYPE_RS232 :
+					CTI_PORT_TYPE_RS422_485;
 		break;
 	default:
 		dev_err(&pcidev->dev, "unknown/unsupported device\n");