Re: [PATCH v6 1/4] HID: wacom: Advertise SW_MUTE_DEVICE capability prior to registration
From: sashiko-bot@kernel.org
Date: 2026-07-16 09:17:27
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Direct bit manipulation is used to set the SW_MUTE_DEVICE capability instead of the preferred input_set_capability() helper. --
--- Patch [1]: [PATCH v6 1/4] HID: wacom: Advertise SW_MUTE_DEVICE capability prior to registration ---commit 5e17768d036dad9565ea2c66ff5662065517024d Author: Lee Jones [off-list ref] HID: wacom: Advertise SW_MUTE_DEVICE capability prior to registration This commit moves the SW_MUTE_DEVICE capability advertisement for touch devices to wacom_setup_touch_input_capabilities() to comply with input subsystem guidelines. It also replaces lookup-dependent product references with hdev->product. [ ... ]
quoted hunk ↗ jump to hunk
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index da1f0ea85625d..6fd1a5bcc28a4 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c@@ -3961,9 +3963,12 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, else __set_bit(INPUT_PROP_POINTER, input_dev->propbit); - if (features->type == HID_GENERIC) + if (features->type == HID_GENERIC) { + input_dev->evbit[0] |= BIT_MASK(EV_SW); + __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
[Severity: Low] This isn't a bug, but since this is setting a single capability, would it be better to use the input_set_capability() helper here instead of direct bit manipulation?
/* setup has already been done */ return 0; + } input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); __set_bit(BTN_TOUCH, input_dev->keybit);
-- Sashiko AI review · https://sashiko.dev/#/patchset/20260716090726.2711293-1-lee@kernel.org?part=1