diff options
author | Jean Delvare <[email protected]> | 2023-08-05 10:10:10 +0200 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-08-09 21:57:50 +0200 |
commit | 5a66d59b5ff537ddae84a1f175c3f8eb1140a562 (patch) | |
tree | 3af4c20cd3e2301dc688919c7f5a231dce7fa3a7 /lib/test_fortify/write_overflow-strcpy.c | |
parent | 1cd0302be5645420f73090aee26fa787287e1096 (diff) |
platform/x86: msi-ec: Fix the build
The msi-ec driver fails to build for me (gcc 7.5):
CC [M] drivers/platform/x86/msi-ec.o
drivers/platform/x86/msi-ec.c:72:6: error: initializer element is not constant
{ SM_ECO_NAME, 0xc2 },
^~~~~~~~~~~
drivers/platform/x86/msi-ec.c:72:6: note: (near initialization for ‘CONF0.shift_mode.modes[0].name’)
drivers/platform/x86/msi-ec.c:73:6: error: initializer element is not constant
{ SM_COMFORT_NAME, 0xc1 },
^~~~~~~~~~~~~~~
drivers/platform/x86/msi-ec.c:73:6: note: (near initialization for ‘CONF0.shift_mode.modes[1].name’)
drivers/platform/x86/msi-ec.c:74:6: error: initializer element is not constant
{ SM_SPORT_NAME, 0xc0 },
^~~~~~~~~~~~~
drivers/platform/x86/msi-ec.c:74:6: note: (near initialization for ‘CONF0.shift_mode.modes[2].name’)
(...)
Don't try to be smart, just use defines for the constant strings. The
compiler will recognize it's the same string and will store it only
once in the data section anyway.
Signed-off-by: Jean Delvare <[email protected]>
Fixes: 392cacf2aa10 ("platform/x86: Add new msi-ec driver")
Cc: [email protected]
Cc: Nikita Kravets <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Mark Gross <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy.c')
0 files changed, 0 insertions, 0 deletions