HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL
PATCH 1/1 HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL
The name of BTN_GEAR_DOWN was WheelBtn and BTN_WHEEL was missing. Further, BTN_GEAR_UP had a space in its name and no Btn, which is against convention. This makes the names BtnGearDown, BtnGearUp, and BtnWheel, fixing the errors and matching convention.
--- drivers/hid/hid-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hid-debug.c +2 -2
@@ -3298,8 +3298,8 @@ static const char *keys[KEY_MAX + 1] = { [BTN_TOUCH] = "Touch", [BTN_STYLUS] = "Stylus", [BTN_STYLUS2] = "Stylus2", [BTN_TOOL_DOUBLETAP] = "ToolDoubleTap", [BTN_TOOL_TRIPLETAP] = "ToolTripleTap", [BTN_TOOL_QUADTAP] = "ToolQuadrupleTap", - [BTN_GEAR_DOWN] = "WheelBtn", - [BTN_GEAR_UP] = "Gear up", [KEY_OK] = "Ok", + [BTN_GEAR_DOWN] = "BtnGearDown", [BTN_GEAR_UP] = "BtnGearUp", + [BTN_WHEEL] = "BtnWheel", [KEY_OK] = "Ok", [KEY_SELECT] = "Select", [KEY_GOTO] = "Goto", [KEY_CLEAR] = "Clear", [KEY_POWER2] = "Power2", [KEY_OPTION] = "Option", [KEY_INFO] = "Info",
Signature · 1 line
2.49.0
Quoted 6 lines · Vicki Pfau
The name of
BTN_GEAR_DOWNwas WheelBtn andBTN_WHEELwas missing. Further,BTN_GEAR_UPhad a space in its name and no Btn, which is against convention. This makes the names BtnGearDown, BtnGearUp, and BtnWheel, fixing the errors and matching convention.Signed-off-by Vicki Pfau <[email protected]>
Applied to hid.git#for-6.16/upstream-fixes. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 10 lines · Jiri Kosina
Quoted 6 lines · Vicki Pfau
The name of
BTN_GEAR_DOWNwas WheelBtn andBTN_WHEELwas missing. Further,BTN_GEAR_UPhad a space in its name and no Btn, which is against convention. This makes the names BtnGearDown, BtnGearUp, and BtnWheel, fixing the errors and matching convention.Signed-off-by Vicki Pfau <[email protected]>Applied to hid.git#for-6.16/upstream-fixes. Thanks,
Too quick. This breaks the build.
drivers/hid/hid-debug.c:3302:16: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
3302 | [BTN_WHEEL] = "BtnWheel", [KEY_OK] = "Ok",
| ^~~~~~~~~~
drivers/hid/hid-debug.c:3301:20: note: previous initialization is here
3301 | [BTN_GEAR_DOWN] = "BtnGearDown", [BTN_GEAR_UP] = "BtnGearUp",
| ^~~~~~~~~~~~~1 error generated.
Please, guys, always test your builds with make W=1 (when CONFIG_WERROR is not dropped) and with GCC and clang.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 1 line · Vicki Pfau
The name of
BTN_GEAR_DOWNwas WheelBtn andBTN_WHEELwas missing.
Not true. Please, read code better.
Quoted 4 lines
Further,
BTN_GEAR_UPhad a space in its name and no Btn, which is against convention. This makes the names BtnGearDown, BtnGearUp, and BtnWheel, fixing the errors and matching convention.
Signature · 2 lines
With Best Regards, Andy Shevchenko