[PATCH 03/50] tty_ioctl(): drop FIONBIO handling

2018-09-12 Thread Al Viro
From: Al Viro That code had been live for 11 weeks back in 1992, but it had been 26 years since sys_ioctl() began handling FIONBIO on its own. Time to to bury the body, already... Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 30 -- 1 file changed, 30

[PATCH 08/50] greybus/uart: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/staging/greybus/uart.c | 47 -- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 8a006323c3c1..3313cb0b60af 100644 ---

[PATCH 24/50] io_ti: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/io_ti.c | 47 ++ 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 6d1d6efa3055..c327d4cf7928 100644 ---

[PATCH 12/50] isicom: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/isicom.c | 72 ++-- 1 file changed, 25 insertions(+), 47 deletions(-) diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c index 8d96e86966f1..e04a43e89f6b 100644 ---

[PATCH 32/50] whiteheat: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro ... and fix the return value - on success it used to have ioctl(2) fill the user-supplied struct serial_struct and return -ENOTTY. Signed-off-by: Al Viro --- drivers/usb/serial/whiteheat.c | 42 +++--- 1 file changed, 15 insertions(+), 27

[PATCH 27/50] opticon: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/opticon.c | 43 --- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index caa0746326fd..cb7aac9cd9e7 100644 ---

[PATCH 25/50] mos7720: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/mos7720.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 4c06357b3ef8..451fca707e04 100644 ---

[PATCH 05/50] tty_ioctl(): start taking TIOC[SG]SERIAL into separate methods

2018-09-12 Thread Al Viro
From: Al Viro ->set_serial() and ->get_serial() resp., both taking tty and a kernel pointer to serial_struct. Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 36 ++-- include/linux/tty_driver.h | 3 +++ 2 files changed, 33 insertions(+), 6 deletions(-)

[PATCH 27/50] opticon: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/opticon.c | 43 --- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index caa0746326fd..cb7aac9cd9e7 100644 ---

[PATCH 25/50] mos7720: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/mos7720.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 4c06357b3ef8..451fca707e04 100644 ---

[PATCH 05/50] tty_ioctl(): start taking TIOC[SG]SERIAL into separate methods

2018-09-12 Thread Al Viro
From: Al Viro ->set_serial() and ->get_serial() resp., both taking tty and a kernel pointer to serial_struct. Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 36 ++-- include/linux/tty_driver.h | 3 +++ 2 files changed, 33 insertions(+), 6 deletions(-)

[PATCH 32/50] whiteheat: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro ... and fix the return value - on success it used to have ioctl(2) fill the user-supplied struct serial_struct and return -ENOTTY. Signed-off-by: Al Viro --- drivers/usb/serial/whiteheat.c | 42 +++--- 1 file changed, 15 insertions(+), 27

[PATCH 31/50] ti_usb_3410_5052: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ti_usb_3410_5052.c | 74 --- 1 file changed, 24 insertions(+), 50 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index

[PATCH 26/50] mos7840: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/mos7840.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index b42bad85097a..8d0b80e44191 100644 ---

[PATCH 34/50] complete ->[sg]et_serial() switchover

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/tty_io.c| 12 drivers/usb/serial/usb-serial.c | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 91d73732e11c..80d6c041c87e 100644 ---

[PATCH 31/50] ti_usb_3410_5052: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ti_usb_3410_5052.c | 74 --- 1 file changed, 24 insertions(+), 50 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index

[PATCH 26/50] mos7840: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/mos7840.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index b42bad85097a..8d0b80e44191 100644 ---

[PATCH 34/50] complete ->[sg]et_serial() switchover

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/tty_io.c| 12 drivers/usb/serial/usb-serial.c | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 91d73732e11c..80d6c041c87e 100644 ---

[PATCH 40/50] kill the rest of tty COMPAT_IOCTL() entries

2018-09-12 Thread Al Viro
From: Al Viro TIOCLINUX is handled by ->compat_ioctl() in the only place that has native ->ioctl() recognizing it, TIOC{START,STOP} are simply useless these days - unrecognized compat ioctl won't spew into syslog anymore. Signed-off-by: Al Viro --- fs/compat_ioctl.c | 13 - 1 file

[PATCH 38/50] isdn_tty: TCSBRK{,P} won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro kill the long-dead code - it's been unreachable since 2008. Redundant, as well - generic will do exact same thing, since ->break_ctl is NULL here... Signed-off-by: Al Viro --- drivers/isdn/i4l/isdn_tty.c | 19 --- 1 file changed, 19 deletions(-) diff --git

[PATCH 13/50] moxa: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Pointless dead assignments in moxa_set_serial_info() killed off; they would've been a bug, if not for the fact that user-settable flags had never been used in that driver. Bogus from day 1, though... Signed-off-by: Al Viro --- drivers/tty/moxa.c | 79

[PATCH 15/50] serial_core: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/serial/serial_core.c | 38 -- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 80bb56facfb6..2c8162b8ebf2 100644 ---

[PATCH 30/50] ssu100: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ssu100.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 0900b47b5f57..f6aea9f1be1a 100644 ---

[PATCH 29/50] quatech2: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/quatech2.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index b61c2a9b6b11..f2fbe1ec9701 100644 ---

[PATCH 35/50] synclink: reduce pointless checks in ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro it's never getting called with TIOC[SG]SERIAL anymore (nor has it ever supported those, while we are at it) Signed-off-by: Al Viro --- drivers/char/pcmcia/synclink_cs.c | 3 +-- drivers/tty/synclink.c| 3 +-- drivers/tty/synclink_gt.c | 3 +--

[PATCH 40/50] kill the rest of tty COMPAT_IOCTL() entries

2018-09-12 Thread Al Viro
From: Al Viro TIOCLINUX is handled by ->compat_ioctl() in the only place that has native ->ioctl() recognizing it, TIOC{START,STOP} are simply useless these days - unrecognized compat ioctl won't spew into syslog anymore. Signed-off-by: Al Viro --- fs/compat_ioctl.c | 13 - 1 file

[PATCH 38/50] isdn_tty: TCSBRK{,P} won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro kill the long-dead code - it's been unreachable since 2008. Redundant, as well - generic will do exact same thing, since ->break_ctl is NULL here... Signed-off-by: Al Viro --- drivers/isdn/i4l/isdn_tty.c | 19 --- 1 file changed, 19 deletions(-) diff --git

[PATCH 13/50] moxa: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Pointless dead assignments in moxa_set_serial_info() killed off; they would've been a bug, if not for the fact that user-settable flags had never been used in that driver. Bogus from day 1, though... Signed-off-by: Al Viro --- drivers/tty/moxa.c | 79

[PATCH 15/50] serial_core: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/serial/serial_core.c | 38 -- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 80bb56facfb6..2c8162b8ebf2 100644 ---

[PATCH 30/50] ssu100: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ssu100.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 0900b47b5f57..f6aea9f1be1a 100644 ---

[PATCH 29/50] quatech2: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/quatech2.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index b61c2a9b6b11..f2fbe1ec9701 100644 ---

[PATCH 35/50] synclink: reduce pointless checks in ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro it's never getting called with TIOC[SG]SERIAL anymore (nor has it ever supported those, while we are at it) Signed-off-by: Al Viro --- drivers/char/pcmcia/synclink_cs.c | 3 +-- drivers/tty/synclink.c| 3 +-- drivers/tty/synclink_gt.c | 3 +--

[PATCH 20/50] f81232: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/f81232.c | 36 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 96036f87b1de..0dcdcb4b2cde 100644 ---

[PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be

[PATCH 20/50] f81232: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/f81232.c | 36 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 96036f87b1de..0dcdcb4b2cde 100644 ---

[PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be

[PATCH 37/50] kill capinc_tty_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro NULL ->ioctl() in tty_operations is treated as "returns -ENOIOCTLCMD"... Signed-off-by: Al Viro --- drivers/isdn/capi/capi.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index ef5560b848ab..e1da70a9530c 100644 ---

[PATCH 36/50] take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 81 fs/compat_ioctl.c| 67 --- 2 files changed, 81 insertions(+), 67 deletions(-) diff --git a/drivers/tty/tty_io.c

[PATCH 33/50] usb_wwan: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/option.c | 3 ++- drivers/usb/serial/usb-wwan.h | 6 +++-- drivers/usb/serial/usb_wwan.c | 63 --- 3 files changed, 23 insertions(+), 49 deletions(-) diff --git

[PATCH 37/50] kill capinc_tty_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro NULL ->ioctl() in tty_operations is treated as "returns -ENOIOCTLCMD"... Signed-off-by: Al Viro --- drivers/isdn/capi/capi.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index ef5560b848ab..e1da70a9530c 100644 ---

[PATCH 36/50] take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 81 fs/compat_ioctl.c| 67 --- 2 files changed, 81 insertions(+), 67 deletions(-) diff --git a/drivers/tty/tty_io.c

[PATCH 33/50] usb_wwan: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/option.c | 3 ++- drivers/usb/serial/usb-wwan.h | 6 +++-- drivers/usb/serial/usb_wwan.c | 63 --- 3 files changed, 23 insertions(+), 49 deletions(-) diff --git

[PATCH 43/50] dgnc: leave TIOC[GS]SOFTCAR to ldisc

2018-09-12 Thread Al Viro
From: Al Viro no point duplicating that in tty_operations ->ioctl() Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index

[PATCH 43/50] dgnc: leave TIOC[GS]SOFTCAR to ldisc

2018-09-12 Thread Al Viro
From: Al Viro no point duplicating that in tty_operations ->ioctl() Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index

[PATCH 21/50] f81534: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/f81534.c | 38 -- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index 4dfbff20bda4..380933db34dd 100644 ---

[PATCH 48/50] compat_ioctl - kill keyboard ioctl handling

2018-09-12 Thread Al Viro
From: Al Viro all of those are provided only by vt and s390 tty3270; both have proper ->compat_ioctl() Signed-off-by: Al Viro --- fs/compat_ioctl.c | 29 - 1 file changed, 29 deletions(-) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index

[PATCH 42/50] remove fallback to drivers for TIOCGICOUNT

2018-09-12 Thread Al Viro
From: Al Viro none of them handles it anyway. Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index b389163c4c5e..0f75ae6bfaa7 100644 --- a/drivers/tty/tty_io.c +++

[PATCH 39/50] dgnc: TIOCM... won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro bury the dead code (and ->tiocmget()/->tiocmset() are there, so I really wonder why have they kept the stuff that became unreachable with the introduction of those...) Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 114 1

[PATCH 45/50] gigaset: don't try to printk userland buffer contents

2018-09-12 Thread Al Viro
From: Al Viro especially when you've just copied it in... Signed-off-by: Al Viro --- drivers/isdn/gigaset/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 600c79b030cd..f9698c0c3885 100644

[PATCH 41/50] dgnc: break-related ioctls won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro kill the dead code, especially since ->break_ctl() will do the right thing anyway. Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 75 - 1 file changed, 75 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c

[PATCH 18/50] cdc-acm: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/class/cdc-acm.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 27346d69f393..5fd59a58de92 100644 ---

[PATCH 21/50] f81534: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/f81534.c | 38 -- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index 4dfbff20bda4..380933db34dd 100644 ---

[PATCH 48/50] compat_ioctl - kill keyboard ioctl handling

2018-09-12 Thread Al Viro
From: Al Viro all of those are provided only by vt and s390 tty3270; both have proper ->compat_ioctl() Signed-off-by: Al Viro --- fs/compat_ioctl.c | 29 - 1 file changed, 29 deletions(-) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index

[PATCH 42/50] remove fallback to drivers for TIOCGICOUNT

2018-09-12 Thread Al Viro
From: Al Viro none of them handles it anyway. Signed-off-by: Al Viro --- drivers/tty/tty_io.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index b389163c4c5e..0f75ae6bfaa7 100644 --- a/drivers/tty/tty_io.c +++

[PATCH 39/50] dgnc: TIOCM... won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro bury the dead code (and ->tiocmget()/->tiocmset() are there, so I really wonder why have they kept the stuff that became unreachable with the introduction of those...) Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 114 1

[PATCH 45/50] gigaset: don't try to printk userland buffer contents

2018-09-12 Thread Al Viro
From: Al Viro especially when you've just copied it in... Signed-off-by: Al Viro --- drivers/isdn/gigaset/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 600c79b030cd..f9698c0c3885 100644

[PATCH 41/50] dgnc: break-related ioctls won't reach ->ioctl()

2018-09-12 Thread Al Viro
From: Al Viro kill the dead code, especially since ->break_ctl() will do the right thing anyway. Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 75 - 1 file changed, 75 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c

[PATCH 18/50] cdc-acm: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/class/cdc-acm.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 27346d69f393..5fd59a58de92 100644 ---

[PATCH 49/50] pty: fix compat ioctls

2018-09-12 Thread Al Viro
From: Al Viro pointer-taking ones need compat_ptr(); int-taking one doesn't. Signed-off-by: Al Viro --- drivers/tty/pty.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 678406e0948b..00099a8439d2 100644 ---

[PATCH 22/50] fdti_sio: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ftdi_sio.c | 48 +++ 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index b5cef322826f..758ba789e997 100644 ---

[PATCH 44/50] dgnc: don't bother with (empty) stub for TCXONC

2018-09-12 Thread Al Viro
From: Al Viro for pity sake, that case is identical to their default: _and_ bears an explicit comment re leaving to ldisc. Which is what default is doing, obviously... Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 49/50] pty: fix compat ioctls

2018-09-12 Thread Al Viro
From: Al Viro pointer-taking ones need compat_ptr(); int-taking one doesn't. Signed-off-by: Al Viro --- drivers/tty/pty.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 678406e0948b..00099a8439d2 100644 ---

[PATCH 22/50] fdti_sio: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ftdi_sio.c | 48 +++ 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index b5cef322826f..758ba789e997 100644 ---

[PATCH 44/50] dgnc: don't bother with (empty) stub for TCXONC

2018-09-12 Thread Al Viro
From: Al Viro for pity sake, that case is identical to their default: _and_ bears an explicit comment re leaving to ldisc. Which is what default is doing, obviously... Signed-off-by: Al Viro --- drivers/staging/dgnc/dgnc_tty.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 46/50] vt_compat_ioctl(): clean up, use compat_ptr() properly

2018-09-12 Thread Al Viro
From: Al Viro we need it for "convert the structure" cases too Signed-off-by: Al Viro --- drivers/tty/vt/vt_ioctl.c | 31 +-- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index

[PATCH 46/50] vt_compat_ioctl(): clean up, use compat_ptr() properly

2018-09-12 Thread Al Viro
From: Al Viro we need it for "convert the structure" cases too Signed-off-by: Al Viro --- drivers/tty/vt/vt_ioctl.c | 31 +-- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index

[PATCH 47/50] gigaset: add ->compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro ... and get rid of COMPAT_IOCTL() for its private ioctls Signed-off-by: Al Viro --- drivers/isdn/gigaset/interface.c | 11 +++ fs/compat_ioctl.c| 5 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/isdn/gigaset/interface.c

[PATCH 16/50] rfcomm: get rid of mentioning TIOC[SG]SERIAL

2018-09-12 Thread Al Viro
From: Al Viro no support there Signed-off-by: Al Viro --- net/bluetooth/rfcomm/tty.c | 8 1 file changed, 8 deletions(-) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 5e44d842cc5d..ba4f59389405 100644 --- a/net/bluetooth/rfcomm/tty.c +++

[PATCH 50/50] synclink_gt(): fix compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro compat_ptr() for pointer-taking ones... Signed-off-by: Al Viro --- drivers/tty/synclink_gt.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index b8287a010336..e8a9047de451 100644 ---

[PATCH 28/50] pl2303: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/pl2303.c | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index e41f725ac7aa..a4e0d13fc121 100644 ---

[PATCH 47/50] gigaset: add ->compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro ... and get rid of COMPAT_IOCTL() for its private ioctls Signed-off-by: Al Viro --- drivers/isdn/gigaset/interface.c | 11 +++ fs/compat_ioctl.c| 5 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/isdn/gigaset/interface.c

[PATCH 16/50] rfcomm: get rid of mentioning TIOC[SG]SERIAL

2018-09-12 Thread Al Viro
From: Al Viro no support there Signed-off-by: Al Viro --- net/bluetooth/rfcomm/tty.c | 8 1 file changed, 8 deletions(-) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 5e44d842cc5d..ba4f59389405 100644 --- a/net/bluetooth/rfcomm/tty.c +++

[PATCH 50/50] synclink_gt(): fix compat_ioctl()

2018-09-12 Thread Al Viro
From: Al Viro compat_ptr() for pointer-taking ones... Signed-off-by: Al Viro --- drivers/tty/synclink_gt.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index b8287a010336..e8a9047de451 100644 ---

[PATCH 28/50] pl2303: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/pl2303.c | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index e41f725ac7aa..a4e0d13fc121 100644 ---

[PATCH 19/50] ark3116: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ark3116.c | 38 -- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 7796ad8e33c6..ff38aa8963cf 100644 ---

[PATCH 23/50] io_edgeport: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/io_edgeport.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 97c69d373ca6..4ca31c0e4174 100644 ---

[PATCH 19/50] ark3116: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/ark3116.c | 38 -- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 7796ad8e33c6..ff38aa8963cf 100644 ---

[PATCH 23/50] io_edgeport: switch to ->get_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/usb/serial/io_edgeport.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 97c69d373ca6..4ca31c0e4174 100644 ---

[PATCH 14/50] mxser: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/mxser.c | 97 - 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 8bc15cb67a58..9d00ff5ef961 100644 --- a/drivers/tty/mxser.c

[PATCH 14/50] mxser: switch to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- drivers/tty/mxser.c | 97 - 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 8bc15cb67a58..9d00ff5ef961 100644 --- a/drivers/tty/mxser.c

[PATCH v5 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-09-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

[PATCH v5 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-09-12 Thread Dan Williams
Changes since v4 [1]: * Rebase on v4.19-rc3 * Update changelogs and cover letter [1]: https://lkml.org/lkml/2018/7/11/14 --- Hi Andrew, Back from vacation and this series is still top of mind. devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and

[PATCH v5 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-09-12 Thread Dan Williams
devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument

[PATCH v5 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only

2018-09-12 Thread Dan Williams
Changes since v4 [1]: * Rebase on v4.19-rc3 * Update changelogs and cover letter [1]: https://lkml.org/lkml/2018/7/11/14 --- Hi Andrew, Back from vacation and this series is still top of mind. devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and

[PATCH v5 4/7] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support

2018-09-12 Thread Dan Williams
In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. Cc: Christoph Hellwig Cc: "Jérôme Glisse" Reported-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Signed-off-by: Dan Williams ---

[PATCH v5 2/7] mm, devm_memremap_pages: Kill mapping "System RAM" support

2018-09-12 Thread Dan Williams
Given the fact that devm_memremap_pages() requires a percpu_ref that is torn down by devm_memremap_pages_release() the current support for mapping RAM is broken. Support for remapping "System RAM" has been broken since the beginning and there is no existing user of this this code path, so just

[PATCH v5 5/7] mm, hmm: Use devm semantics for hmm_devmem_{add, remove}

2018-09-12 Thread Dan Williams
devm semantics arrange for resources to be torn down when device-driver-probe fails or when device-driver-release completes. Similar to devm_memremap_pages() there is no need to support an explicit remove operation when the users properly adhere to devm semantics. Note that devm_kzalloc()

[PATCH v5 6/7] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-09-12 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to

[PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-12 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on

[PATCH v5 7/7] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-09-12 Thread Dan Williams
The routines hmm_devmem_add(), and hmm_devmem_add_resource() duplicated devm_memremap_pages() and are now simple now wrappers around the core facility to inject a dev_pagemap instance into the global pgmap_radix and hook page-idle events. The devm_memremap_pages() interface is base infrastructure

[PATCH v5 2/7] mm, devm_memremap_pages: Kill mapping "System RAM" support

2018-09-12 Thread Dan Williams
Given the fact that devm_memremap_pages() requires a percpu_ref that is torn down by devm_memremap_pages_release() the current support for mapping RAM is broken. Support for remapping "System RAM" has been broken since the beginning and there is no existing user of this this code path, so just

[PATCH v5 5/7] mm, hmm: Use devm semantics for hmm_devmem_{add, remove}

2018-09-12 Thread Dan Williams
devm semantics arrange for resources to be torn down when device-driver-probe fails or when device-driver-release completes. Similar to devm_memremap_pages() there is no need to support an explicit remove operation when the users properly adhere to devm semantics. Note that devm_kzalloc()

[PATCH v5 6/7] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-09-12 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to

[PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-12 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on

[PATCH v5 7/7] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-09-12 Thread Dan Williams
The routines hmm_devmem_add(), and hmm_devmem_add_resource() duplicated devm_memremap_pages() and are now simple now wrappers around the core facility to inject a dev_pagemap instance into the global pgmap_radix and hook page-idle events. The devm_memremap_pages() interface is base infrastructure

[PATCH v5 4/7] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support

2018-09-12 Thread Dan Williams
In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. Cc: Christoph Hellwig Cc: "Jérôme Glisse" Reported-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Signed-off-by: Dan Williams ---

Re: [Question] vendor-specific cpu enable-method

2018-09-12 Thread Jisheng Zhang
On Thu, 13 Sep 2018 10:23:35 +0900 Masahiro Yamada wrote: > Hello. > > > Sorry if I am asking a stupid question. > > > For arm64, there are only 2 cpu methods, psci and spin-table. > > Why do we still allow vendor-specific methods upstreamed > for arm 32bit ports? > > To me, it looks like

Re: [Question] vendor-specific cpu enable-method

2018-09-12 Thread Jisheng Zhang
On Thu, 13 Sep 2018 10:23:35 +0900 Masahiro Yamada wrote: > Hello. > > > Sorry if I am asking a stupid question. > > > For arm64, there are only 2 cpu methods, psci and spin-table. > > Why do we still allow vendor-specific methods upstreamed > for arm 32bit ports? > > To me, it looks like

Re: [PATCH] workqueue: combine judgments in the loop ofmaybe_create_worker

2018-09-12 Thread Lai Jiangshan
On Thu, Sep 13, 2018 at 9:51 AM wrote: > > >> From: Liu Song > >> > >> Although the 'need_to_create_worker' has been determined to be > >> true before entering the function. However, adjusting the order > >> of judgment can combine two judgments in the loop. Also improve > >> the matching

Re: [PATCH] workqueue: combine judgments in the loop ofmaybe_create_worker

2018-09-12 Thread Lai Jiangshan
On Thu, Sep 13, 2018 at 9:51 AM wrote: > > >> From: Liu Song > >> > >> Although the 'need_to_create_worker' has been determined to be > >> true before entering the function. However, adjusting the order > >> of judgment can combine two judgments in the loop. Also improve > >> the matching

<    1   2   3   4   5   6   7   8   9   10   >