mbox series

[00/25] Change tty_port(standard)_install's return type

Message ID 1536029091-4426-1-git-send-email-climbbb.kim@gmail.com
Headers show
Series Change tty_port(standard)_install's return type | expand

Message

Jaejoong Kim Sept. 4, 2018, 2:44 a.m. UTC
Many drivers with tty use the tty_stand_install(). But, there is no
need to handle the error, since it always returns 0. So, change the
return type of tty_standard_install() and tty_port_install() to void
type and remove unnecessary exception handling where we use these
functions.

Change return type for tty functions. Patch No.01
  tty: Change return type to void

Apply tty_port_install() changes. Patch No.02~14
  isdn: i4l: isdn_tty: Change return type to void
  ...
  Bluetooth: Change return type to void

Apply tty_standard_install() changes. Patch No.15~25
  um: Change return type to void
  ...
  usb: usb-serial: Change return type to void

Jaejoong Kim (25):
  tty: Change return type to void
  isdn: i4l: isdn_tty: Change return type to void
  s390: char: con3215: Change return type to void
  s390: char: tty3270: Change return type to void
  tty: hvc: hvc_console: Change return type to void
  tty: hvc: hvcs: Change return type to void
  tty: mips_ejtag_fdc: Change return type to void
  tty: n_gsm: Change return type to void
  tty: serial: kgdb_nmi: Change return type to void
  tty: synclink: Change return type to void
  tty: synclinkmp: Change return type to void
  tty: vt: Change return type to void
  usb: xhci: dbc: Change return type to void
  Bluetooth: Change return type to void
  um: Change return type to void
  isdn: capi: Change return type to void
  misc: pti: Change return type to void
  mmc: core: sdio_uart: Change return type to void
  staging: fwserial: Change return type to void
  staging: gdm724x: gdm_tty: Change return type to void
  staging: greybus: uart: Change return type to void
  tty: nozomi: Change return type to void
  tty: vcc: Change return type to void
  usb: cdc-acm: Change return type to void
  usb: usb-serial: Change return type to void

 arch/um/drivers/line.c              |  7 +------
 drivers/isdn/capi/capi.c            | 10 ++++------
 drivers/isdn/i4l/isdn_tty.c         |  3 ++-
 drivers/misc/pti.c                  | 28 +++++++++++++---------------
 drivers/mmc/core/sdio_uart.c        | 11 ++++-------
 drivers/s390/char/con3215.c         |  3 ++-
 drivers/s390/char/tty3270.c         |  7 +------
 drivers/staging/fwserial/fwserial.c | 22 ++++++++--------------
 drivers/staging/gdm724x/gdm_tty.c   | 11 +++--------
 drivers/staging/greybus/uart.c      | 10 ++--------
 drivers/tty/hvc/hvc_console.c       |  7 ++-----
 drivers/tty/hvc/hvcs.c              | 10 ++--------
 drivers/tty/mips_ejtag_fdc.c        |  4 +++-
 drivers/tty/n_gsm.c                 |  9 +--------
 drivers/tty/nozomi.c                |  8 +++-----
 drivers/tty/serial/kgdb_nmi.c       | 11 +----------
 drivers/tty/synclink.c              |  3 ++-
 drivers/tty/synclinkmp.c            |  3 ++-
 drivers/tty/tty_io.c                | 10 ++++++----
 drivers/tty/tty_port.c              |  4 ++--
 drivers/tty/vcc.c                   |  5 +----
 drivers/tty/vt/vt.c                 |  5 +----
 drivers/usb/class/cdc-acm.c         | 10 +---------
 drivers/usb/host/xhci-dbgtty.c      |  3 ++-
 drivers/usb/serial/usb-serial.c     |  6 +-----
 include/linux/tty.h                 |  4 ++--
 net/bluetooth/rfcomm/tty.c          |  7 +------
 27 files changed, 73 insertions(+), 148 deletions(-)

Comments

Sam Ravnborg Sept. 4, 2018, 4:42 a.m. UTC | #1
Hi Jaejoong.

> Change return type for tty functions. Patch No.01
>   tty: Change return type to void
Adding this patch first will generate a lot of warnings
until all users are updated.
It is usual practice to prepare all users
and then apply the infrastructure changes as the
last patch.
Then people will not see a lot of warnings when
they build something in the middle,
and I guess current stack set may also generate
a few mails from the 0-day build infrastructure.


>   isdn: i4l: isdn_tty: Change return type to void

And a nitpick on the patch description.
This patch do not change any return type, but
it ignore the return value og tty_part_install().
Same goes for all ramaining patches.

	Sam
Alan Cox Sept. 12, 2018, 2:41 p.m. UTC | #2
On Tue,  4 Sep 2018 11:44:26 +0900
Jaejoong Kim <climbbb.kim@gmail.com> wrote:

> Many drivers with tty use the tty_stand_install(). But, there is no
> need to handle the error, since it always returns 0.


And what happens if another change means it can fail again. It's just a
property of the current implementation that it can't. It used to fail.

This seems to be a ton of unneccessary churn that will end up just having
to be reversed again some day in the future.

Alan