Commit 7b2daa6
HID: debug: Remove duplicates from 'keys'
Duplicates in 'keys prevents kernel builds with clang, `make W=1` and
CONFIG_WERROR=y, for example:
drivers/hid/hid-debug.c:3443:18: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
3443 | [KEY_HANGEUL] = "HanGeul", [KEY_HANGUP_PHONE] = "HangUpPhone",
| ^~~~~~~~~
drivers/hid/hid-debug.c:3217:18: note: previous initialization is here
3217 | [KEY_HANGUEL] = "Hangeul", [KEY_HANJA] = "Hanja",
| ^~~~~~~~~
Fix this by removing them.
The logic of removal is that, remove...
1) if there is a constant that uses another defined constant, OR
2) the one that appears later in the list.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>1 parent b2b8a75 commit 7b2daa6
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3309 | 3309 | | |
3310 | 3310 | | |
3311 | 3311 | | |
3312 | | - | |
| 3312 | + | |
3313 | 3313 | | |
3314 | | - | |
| 3314 | + | |
3315 | 3315 | | |
3316 | 3316 | | |
3317 | 3317 | | |
| |||
3409 | 3409 | | |
3410 | 3410 | | |
3411 | 3411 | | |
3412 | | - | |
3413 | | - | |
| 3412 | + | |
3414 | 3413 | | |
3415 | 3414 | | |
3416 | 3415 | | |
| |||
3440 | 3439 | | |
3441 | 3440 | | |
3442 | 3441 | | |
3443 | | - | |
| 3442 | + | |
3444 | 3443 | | |
3445 | 3444 | | |
3446 | 3445 | | |
| |||
0 commit comments