]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: debug: Remove duplicate entry (BTN_WHEEL)
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 10 Jul 2025 09:41:20 +0000 (12:41 +0300)
committerBenjamin Tissoires <bentiss@kernel.org>
Thu, 10 Jul 2025 10:03:17 +0000 (12:03 +0200)
BTN_WHEEL is duplicated (by value) and compiler is not happy about that:

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",
      |                           ^~~~~~~~~~~~~

Remove it again, as the commit 7b2daa648eb7 ("HID: debug: Remove duplicates
from 'keys'") already did this once in the past.

Fixes: 194808a1ea39 ("HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250710094120.753358-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-debug.c

index c6b6b10295401be69eb8743393ebf8d5f4ba614f..4424c0512baecc90a8becdcde0f2e4a9bda094ec 100644 (file)
@@ -3299,7 +3299,7 @@ static const char *keys[KEY_MAX + 1] = {
        [BTN_STYLUS2] = "Stylus2",              [BTN_TOOL_DOUBLETAP] = "ToolDoubleTap",
        [BTN_TOOL_TRIPLETAP] = "ToolTripleTap", [BTN_TOOL_QUADTAP] = "ToolQuadrupleTap",
        [BTN_GEAR_DOWN] = "BtnGearDown",        [BTN_GEAR_UP] = "BtnGearUp",
-       [BTN_WHEEL] = "BtnWheel",               [KEY_OK] = "Ok",
+                                               [KEY_OK] = "Ok",
        [KEY_SELECT] = "Select",                [KEY_GOTO] = "Goto",
        [KEY_CLEAR] = "Clear",                  [KEY_POWER2] = "Power2",
        [KEY_OPTION] = "Option",                [KEY_INFO] = "Info",