Skip to contentSkip to conversation

HID: Remove the unused variable minor

PATCH In review Jiapeng Chong 2 participants 2 messages Apr 7, 2024 – Apr 12, 2024 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: Remove the unused variable minor

Variable minor is not effectively used, so delete it.

drivers/hid/hid-winwing.c:123:15: warning: variable 'minor' set but not used.

---
 drivers/hid/hid-winwing.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/hid/hid-winwing.c +0 -3
index d895c82a541d..0e224d1a6466 100644
@@ -120,7 +120,6 @@ static int winwing_init_led(struct hid_device *hdev,
 static int winwing_probe(struct hid_device *hdev,
 		const struct hid_device_id *id)
 {
-	unsigned int minor;
 	int ret;
 
 	ret = hid_parse(hdev);
@@ -135,8 +134,6 @@ static int winwing_probe(struct hid_device *hdev,
 		return ret;
 	}
 
-	minor = ((struct hidraw *) hdev->hidraw)->minor;
-
 	return 0;
 }
 
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 7 lines · Jiapeng Chong

Variable minor is not effectively used, so delete it.

drivers/hid/hid-winwing.c:123:15: warning: variable 'minor' set but not used.

I've added

Fixes 266c990debad2 ("HID: Add WinWing Orion2 throttle support")

CCed Ivan here, and applied. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs