Re: [PATCH 12/26] Input: maplecontrol - remove unused mdev->driver assignment
From: sashiko-bot@kernel.org
Date: 2026-07-04 06:07:00
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing `input_sync()` after reporting events in the maple controller callback.
--
commit 0fbd521bb62afe1470ddde2cd989f82804cfb127
Author: Dmitry Torokhov [off-list ref]
Input: maplecontrol - remove unused mdev->driver assignment
The driver field in struct maple_device is no longer used since commit
1795cf48b322 ("sh/maple: clean maple bus code") which removed the reading
of this field. Remove the unused assignment to mdev->driver and the now
unused mdrv variable in probe_maple_controller.
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 79cec89ad52a9..955e01bcfa0c1 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c@@ -95,7 +95,6 @@ static int probe_maple_controller(struct device *dev) }; struct maple_device *mdev = to_maple_dev(dev); - struct maple_driver *mdrv = to_maple_driver(dev->driver); int i, error; struct dc_pad *pad; struct input_dev *idev;@@ -138,9 +137,6 @@ static int probe_maple_controller(struct device *dev) error = input_register_device(idev); if (error) goto fail; - - mdev->driver = mdrv; - return 0; fail:
[Severity: High] This isn't a bug introduced by this patch, but I noticed an issue in this file while reviewing the driver. Does the hardware callback need to emit a synchronization event after reporting the controller state? Looking at drivers/input/joystick/maplecontrol.c:dc_pad_callback(): ... input_report_abs(dev, ABS_X, res[12]); input_report_abs(dev, ABS_Y, res[13]); input_report_abs(dev, ABS_RX, res[14]); input_report_abs(dev, ABS_RY, res[15]); } Without calling input_sync() at the end of this logical group of events, userspace clients will not receive SYN_REPORT. Won't this cause them to buffer events indefinitely and prevent the gamepad from functioning? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260703-b4-maple-cleanup-v1-0-41e424964da5@gmail.com?part=12