Re: [PATCH 25/26] Input: maplecontrol - fix style issues
From: sashiko-bot@kernel.org
Date: 2026-07-04 06:12:44
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [High] Missing `input_sync()` in the event reporting callback, preventing event delivery to standard userspace clients. -- commit 85e64697864750aa3ae1b20ac7b36084615ece73 Author: Dmitry Torokhov [off-list ref] Input: maplecontrol - fix style issues This commit fixes coding style and formatting issues reported by checkpatch.pl. It switches to using BIT() macros and removes conditionals when reporting D-PAD events.
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c@@ -35,22 +35,22 @@ static void dc_pad_callback(struct mapleq *mq)
[ ... ]
- input_report_key(dev, BTN_SELECT, buttons & 0x0800); + input_report_key(dev, BTN_C, buttons & BIT(0)); + input_report_key(dev, BTN_B, buttons & BIT(1)); + input_report_key(dev, BTN_A, buttons & BIT(2)); + input_report_key(dev, BTN_START, buttons & BIT(3)); + input_report_key(dev, BTN_Z, buttons & BIT(8)); + input_report_key(dev, BTN_Y, buttons & BIT(9)); + input_report_key(dev, BTN_X, buttons & BIT(10)); + input_report_key(dev, BTN_SELECT, buttons & BIT(11)); input_report_abs(dev, ABS_GAS, res[10]); input_report_abs(dev, ABS_BRAKE, res[11]);
[Severity: High] This is a pre-existing issue, but does dc_pad_callback() need a call to input_sync() at the end of the event reporting block? When the maple bus periodically invokes this callback to parse the hardware state, all axis and key updates are pushed to the input core, but the function returns without finalizing the packet. Modern input stacks like evdev buffer events and wait for an EV_SYN sync event to wake up userspace. Without a sync event after these inputs are reported, do the events remain buffered indefinitely and fail to reach applications? Could an input_sync(dev) call be added before the callback returns to ensure the state updates are successfully flushed to userspace? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260703-b4-maple-cleanup-v1-0-41e424964da5@gmail.com?part=25