Re: [PATCH 2/3] Revert "Input: hyperv-keyboard - register as a wakeup source"

2024-10-04 Thread Dmitry Torokhov
On Tue, Sep 24, 2024 at 03:28:51AM +, Srivatsa S. Bhat wrote: > [+linux-pm, Rafael, Len, Pavel] > > On Thu, Sep 12, 2024 at 02:27:49PM -0700, Erni Sri Satya Vennela wrote: > > This reverts commit 62238f3aadc9bc56da70100e19ec61b9f8d72a5f. > > > > Remove keyboard as wakeup source since Suspend-

[PATCH 24/24] Input: xilinx_ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/xilinx_ps2.c | 15 +-- 1 file changed, 5 insertions

[PATCH 23/24] Input: userio - switch to using cleanup functions

2024-09-04 Thread Dmitry Torokhov
Use __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/userio.c | 141 +-- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/drivers/input/serio/userio.c b/drivers/input

[PATCH 22/24] Input: sun4i-ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/sun4i-ps2.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[PATCH 21/24] Input: serio-raw - fix potential serio port name truncation

2024-09-04 Thread Dmitry Torokhov
to 20 bytes to accommodate the largest possible port number. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serio_raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index aef8301313b2..e058fef07f5

[PATCH 19/24] Input: serio - use guard notation when acquiring mutexes and spinlocks

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serio.c | 164 ++-- 1 file changed

[PATCH 20/24] Input: serio_raw - use guard notation for locks and other resources

2024-09-04 Thread Dmitry Torokhov
Use guard notation when acquiring mutexes and spinlocks, and when pausing and resuming serio port. Such guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry

[PATCH 18/24] Input: serport - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serport.c | 27 --- 1 file changed, 8

[PATCH 17/24] Input: sa1111ps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/saps2.c | 8 +++- 1 file changed, 3 insertions(+), 5

[PATCH 16/24] Input: q40kbd - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/q40kbd.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH 15/24] Input: ps2mult - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2mult.c | 25 +++-- 1 file changed, 7

[PATCH 14/24] Input: ps2-gpio - use guard notation when acquiring mutex

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that mutexes are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 13/24] Input: i8042 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042.c | 204 +++- 1 file changed

[PATCH 12/24] Input: i8042 - tease apart interrupt handler

2024-09-04 Thread Dmitry Torokhov
In preparation to using guard notation when acquiring mutexes and spinlocks factor out handling of active multiplexing mode from i8042_interrupt(). Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042.c | 139 +--- 1 file changed, 83 insertions(+), 56

[PATCH 11/24] Input: hyperv-keyboard - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/hyperv-keyboard.c | 38 +-- 1 file changed

[PATCH 10/24] Input: gscps2 - use guard notation when acquiring spinlock

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/gscps2.c | 114 +++ 1 file changed

[PATCH 09/24] Input: elo - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/elo.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 08/24] Input: synaptics-rmi4 - use guard notation when pausing serio port in F03

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/rmi4/rmi_f03.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 07/24] Input: sunkbd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/sunkbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH 06/24] Input: atkbd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/atkbd.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 05/24] Input: synaptics - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 04/24] Input: byd - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/byd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH 03/24] Input: alps - use guard notation when pausing serio port

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 02/24] Input: libps2 - use guard notation when temporarily pausing serio ports

2024-09-04 Thread Dmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/libps2.c | 28 +++- 1 file changed, 15

[PATCH 01/24] Input: serio - define serio_pause_rx guard to pause and resume serio ports

2024-09-04 Thread Dmitry Torokhov
se_rx, elo->serio) { elo->expected_packet = toupper(packet[0]); init_completion(&elo->cmd_done); } Signed-off-by: Dmitry Torokhov --- include/linux/serio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/serio.h b/incl

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

2024-09-04 Thread Dmitry Torokhov
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