Thread (20 messages) flat view 20 messages, 2 authors, 22h ago

Re: [PATCH v5 06/13] HID: asus: add joysticks inner and outer range configuration

From: sashiko-bot@kernel.org
Date: 2026-09-04 15:25:11

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `cfg` parameter in `ally_set_joystick_thresholds` is passed but never used within the function.
--

commit 221ad3b5bb99d01e136cae46aadc818940877d10
Author: Denis Benato [off-list ref]

HID: asus: add joysticks inner and outer range configuration

This commit adds sysfs attributes to configure the inner and outer ranges
(deadzones and sensitivity) for the joysticks on ROG Ally devices.
quoted hunk ↗ jump to hunk
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 659956ebaefca..8b9ab5f7931c0 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
[ ... ]
+static int ally_set_joystick_thresholds(struct ally_handheld *ally,
+					struct hid_device *hdev, struct ally_config *cfg,
+					u8 left_it, u8 left_ot, u8 right_it, u8 right_ot)
+{
+	const u8 payload[] = { left_it, left_ot, right_it, right_ot };
[Severity: Low]
Is it necessary to pass the cfg parameter to this function?

Looking at the body of ally_set_joystick_thresholds() in
drivers/hid/hid-asus.c, the struct ally_config pointer cfg is passed but
never referenced. Could this parameter be removed to clean up the function
signature?
+	int ret;
+
+	u8 *buf __free(kfree) = ally_alloc_cmd(CMD_SET_JOYSTICK_DEADZONE, payload, sizeof(payload));
+	if (!buf)
+		return -ENOMEM;
+
+	ret = ally_gamepad_send_packet(ally, hdev, buf, ROG_ALLY_REPORT_SIZE);
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260904145845.184887-1-denis.benato@linux.dev?part=6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help