Skip to content

Convert serio-related drivers to use new cleanup facilities

Dmitry Torokhov linux-arm-kernel linux-hyperv linux-input linux-sunxi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24Input: serio - define serio_pause_rx guard to pause and resume serio portsinclude/linux/serio.h+3 -00 replies
2/24Input: libps2 - use guard notation when temporarily pausing serio portsdrivers/input/serio/libps2.c+15 -130 replies
3/24Input: alps - use guard notation when pausing serio portdrivers/input/mouse/alps.c+1 -31 reply
4/24Input: byd - use guard notation when pausing serio portdrivers/input/mouse/byd.c+2 -30 replies
5/24Input: synaptics - use guard notation when pausing serio portdrivers/input/mouse/synaptics.c+2 -40 replies
6/24Input: atkbd - use guard notation when pausing serio portdrivers/input/keyboard/atkbd.c+4 -40 replies
7/24Input: sunkbd - use guard notation when pausing serio portdrivers/input/keyboard/sunkbd.c+2 -30 replies
8/24Input: synaptics-rmi4 - use guard notation when pausing serio port in F03drivers/input/rmi4/rmi_f03.c+2 -20 replies
9/24Input: elo - use guard notation when pausing serio portdrivers/input/touchscreen/elo.c+4 -40 replies
10/24Input: gscps2 - use guard notation when acquiring spinlockdrivers/input/serio/gscps2.c+62 -520 replies
11/24Input: hyperv-keyboard - use guard notation when acquiring spinlockdrivers/input/serio/hyperv-keyboard.c+18 -200 replies
12/24Input: i8042 - tease apart interrupt handlerdrivers/input/serio/i8042.c+83 -560 replies
13/24Input: i8042 - use guard notation when acquiring spinlockdrivers/input/serio/i8042.c+82 -1220 replies
14/24Input: ps2-gpio - use guard notation when acquiring mutexdrivers/input/serio/ps2-gpio.c+2 -20 replies
15/24Input: ps2mult - use guard notation when acquiring spinlockdrivers/input/serio/ps2mult.c+7 -180 replies
16/24Input: q40kbd - use guard notation when acquiring spinlockdrivers/input/serio/q40kbd.c+2 -80 replies
17/24Input: sa1111ps2 - use guard notation when acquiring spinlockdrivers/input/serio/sa1111ps2.c+3 -50 replies
18/24Input: serport - use guard notation when acquiring spinlockdrivers/input/serio/serport.c+8 -190 replies
19/24Input: serio - use guard notation when acquiring mutexes and spinlocksdrivers/input/serio/serio.c+65 -990 replies
20/24Input: serio_raw - use guard notation for locks and other resourcesdrivers/input/serio/serio_raw.c+49 -721 reply
21/24Input: serio-raw - fix potential serio port name truncationdrivers/input/serio/serio_raw.c+2 -20 replies
22/24Input: sun4i-ps2 - use guard notation when acquiring spinlockdrivers/input/serio/sun4i-ps2.c+2 -60 replies
23/24Input: userio - switch to using cleanup functionsdrivers/input/serio/userio.c+70 -710 replies
24/24Input: xilinx_ps2 - use guard notation when acquiring spinlockdrivers/input/serio/xilinx_ps2.c+5 -100 replies

Reviews trailers per patch

1 of 24 patches has a Reviewed-by or Acked-by.

PatchPali Rohár
1/24
2/24
3/24A-b
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
24/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/24] Convert serio-related drivers to use new cleanup facilities

Hi,

This series converts drivers found in drivers/input/serio as well as a few of input drivers using serio to use new __free() and guard() cleanup facilities that simplify the code and ensure that all resources are released appropriately.

First patch introduces serio_pause_rx guard that pauses delivery of interrupts/data for a given serio port by calling serio_pause_rx() helper and automatically resumes it by calling serio_resume_rx() when needed.

The following 8 patches make use if this new guard.

The rest of the patches switch serio drivers to use guard(mutex), guard(spinlock*) and other cleanup functions to simplify the code.

Thanks!

Dmitry Torokhov (24):
Input: serio - define serio_pause_rx guard to pause and resume serio ports
Input: libps2 - use guard notation when temporarily pausing serio ports
Input: alps - use guard notation when pausing serio port
Input: byd - use guard notation when pausing serio port
Input: synaptics - use guard notation when pausing serio port
Input: atkbd - use guard notation when pausing serio port
Input: sunkbd - use guard notation when pausing serio port
Input: synaptics-rmi4 - use guard notation when pausing serio port in F03
Input: elo - use guard notation when pausing serio port
Input: gscps2 - use guard notation when acquiring spinlock
Input: hyperv-keyboard - use guard notation when acquiring spinlock
Input: i8042 - tease apart interrupt handler
Input: i8042 - use guard notation when acquiring spinlock
Input: ps2-gpio - use guard notation when acquiring mutex
Input: ps2mult - use guard notation when acquiring spinlock
Input: q40kbd - use guard notation when acquiring spinlock
Input: sa1111ps2 - use guard notation when acquiring spinlock
Input: serport - use guard notation when acquiring spinlock
Input: serio - use guard notation when acquiring mutexes and spinlocks
Input: serio_raw - use guard notation for locks and other resources
Input: serio-raw - fix potential serio port name truncation
Input: sun4i-ps2 - use guard notation when acquiring spinlock
Input: userio - switch to using cleanup functions
Input: xilinx_ps2 - use guard notation when acquiring spinlock

 drivers/input/keyboard/atkbd.c        |   8 +-
 drivers/input/keyboard/sunkbd.c       |   5 +-
 drivers/input/mouse/alps.c            |   4 +-
 drivers/input/mouse/byd.c             |   5 +-
 drivers/input/mouse/synaptics.c       |   6 +-
 drivers/input/rmi4/rmi_f03.c          |   4 +-
 drivers/input/serio/gscps2.c          | 114 +++++----
 drivers/input/serio/hyperv-keyboard.c |  38 ++-
 drivers/input/serio/i8042.c           | 327 +++++++++++++-------------
 drivers/input/serio/libps2.c          |  28 ++-
 drivers/input/serio/ps2-gpio.c        |   4 +-
 drivers/input/serio/ps2mult.c         |  25 +-
 drivers/input/serio/q40kbd.c          |  10 +-
 drivers/input/serio/sa1111ps2.c       |   8 +-
 drivers/input/serio/serio.c           | 164 +++++--------
 drivers/input/serio/serio_raw.c       | 125 ++++------
 drivers/input/serio/serport.c         |  27 +--
 drivers/input/serio/sun4i-ps2.c       |   8 +-
 drivers/input/serio/userio.c          | 141 ++++++-----
 drivers/input/serio/xilinx_ps2.c      |  15 +-
 drivers/input/touchscreen/elo.c       |   8 +-
 include/linux/serio.h                 |   3 +
 22 files changed, 487 insertions(+), 590 deletions(-)
Signature · 1 line
Dmitry