lkml.org 
[lkml]   [2024]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 4/4] serial: exar: remove ternaries from cti_get_port_type_xr17c15x_xr17v25x()
From
On 19. 04. 24, 16:17, Parker Newman wrote:
> From: Parker Newman <pnewman@connecttech.com>
>
> Remove ternary operators from cti_get_port_type_xr17c15x_xr17v25x() for
> better readability.
>
> Signed-off-by: Parker Newman <pnewman@connecttech.com>

Much better.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -726,7 +726,7 @@ static enum cti_port_type cti_get_port_type_xr17c15x_xr17v25x(struct exar8250 *p
> struct pci_dev *pcidev,
> unsigned int port_num)
> {
> - enum cti_port_type port_type;
> + enum cti_port_type port_type = CTI_PORT_TYPE_RS232;
>
> switch (pcidev->subsystem_device) {
> // RS232 only cards

Unrelated to this one, but // comments are discouraged in the kernel, IMO?

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2024-05-27 17:55    [W:0.211 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site