Skip to contentSkip to conversation

HID: nintendo: Remove some unused functions

PATCH In review Jiapeng Chong 2 participants 2 messages Jan 26, 2024 – Feb 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: nintendo: Remove some unused functions

These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions.

drivers/hid/hid-nintendo.c:757:20: warning: unused function 'joycon_type_has_left_controls'. drivers/hid/hid-nintendo.c:763:20: warning: unused function 'joycon_type_has_right_controls'.

---
 drivers/hid/hid-nintendo.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/hid/hid-nintendo.c +0 -12
index 7ce6be0a8dee..ab5953fc2436 100644
@@ -754,18 +754,6 @@ static inline bool joycon_type_is_right_nescon(struct joycon_ctlr *ctlr)
 	return ctlr->ctlr_type == JOYCON_CTLR_TYPE_NESR;
 }
 
-static inline bool joycon_type_has_left_controls(struct joycon_ctlr *ctlr)
-{
-	return joycon_type_is_left_joycon(ctlr) ||
-	       joycon_type_is_procon(ctlr);
-}
-
-static inline bool joycon_type_has_right_controls(struct joycon_ctlr *ctlr)
-{
-	return joycon_type_is_right_joycon(ctlr) ||
-	       joycon_type_is_procon(ctlr);
-}
-
 static inline bool joycon_type_is_any_joycon(struct joycon_ctlr *ctlr)
 {
 	return joycon_type_is_left_joycon(ctlr) ||
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 9 lines · Jiapeng Chong

These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions.

drivers/hid/hid-nintendo.c:757:20: warning: unused function 'joycon_type_has_left_controls'. drivers/hid/hid-nintendo.c:763:20: warning: unused function 'joycon_type_has_right_controls'.

No idea why those were added, CCing Ryan, who added those in 94f18bb1994. I've added a Fixes: tag and applied, thanks.

Quoted 30 lines
---
 drivers/hid/hid-nintendo.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/hid/hid-nintendo.c +0 -12
index 7ce6be0a8dee..ab5953fc2436 100644
@@ -754,18 +754,6 @@ static inline bool joycon_type_is_right_nescon(struct joycon_ctlr *ctlr)
 	return ctlr->ctlr_type == JOYCON_CTLR_TYPE_NESR;
 }
 
-static inline bool joycon_type_has_left_controls(struct joycon_ctlr *ctlr)
-{
-	return joycon_type_is_left_joycon(ctlr) ||
-	       joycon_type_is_procon(ctlr);
-}
-
-static inline bool joycon_type_has_right_controls(struct joycon_ctlr *ctlr)
-{
-	return joycon_type_is_right_joycon(ctlr) ||
-	       joycon_type_is_procon(ctlr);
-}
-
 static inline bool joycon_type_is_any_joycon(struct joycon_ctlr *ctlr)
 {
 	return joycon_type_is_left_joycon(ctlr) ||
Signature · 1 line
2.20.1.7.g153144c
Signature · 2 lines
Jiri Kosina
SUSE Labs