Re: [PATCH v3 06/13] tty: Convert ->carrier_raised() and callchains to bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 11, 2023 at 04:23:24PM +0200, Ilpo Järvinen wrote:
> Return boolean from ->carrier_raised() instead of 0 and 1. Make the
> return type change also to tty_port_carrier_raised() that makes the
> ->carrier_raised() call (+ cd variable in moxa into which its return
> value is stored).
> 
> Also cleans up a few unnecessary constructs related to this change:
> 
> 	return xx ? 1 : 0;
> 	-> return xx;
> 
> 	if (xx)
> 		return 1;
> 	return 0;
> 	-> return xx;
> 
> Reviewed-by: Jiri Slaby <jirislaby@xxxxxxxxxx>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---
>  drivers/char/pcmcia/synclink_cs.c | 8 +++-----
>  drivers/mmc/core/sdio_uart.c      | 7 +++----
>  drivers/tty/amiserial.c           | 2 +-
>  drivers/tty/moxa.c                | 4 ++--
>  drivers/tty/mxser.c               | 5 +++--
>  drivers/tty/n_gsm.c               | 8 ++++----
>  drivers/tty/serial/serial_core.c  | 9 ++++-----
>  drivers/tty/synclink_gt.c         | 7 ++++---
>  drivers/tty/tty_port.c            | 4 ++--
>  drivers/usb/serial/ch341.c        | 7 +++----
>  drivers/usb/serial/f81232.c       | 6 ++----
>  drivers/usb/serial/pl2303.c       | 7 ++-----
>  drivers/usb/serial/spcp8x5.c      | 7 ++-----
>  drivers/usb/serial/usb-serial.c   | 4 ++--
>  include/linux/tty_port.h          | 6 +++---
>  include/linux/usb/serial.h        | 2 +-
>  net/bluetooth/rfcomm/tty.c        | 2 +-
>  17 files changed, 42 insertions(+), 53 deletions(-)

Same here, please split out the USB serial changes except for the
actual tty-port op change in usb-serial.c.

You can submit a follow-up series for USB serial as those changes are
otherwise unrelated to the changed tty-port interface.

Johan



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux