Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: GED: fix -Wformat

Clang is more aggressive about -Wformat warnings when the format flag
specifies a type smaller than the parameter. It turns out that gsi is an
int. Fixes:

drivers/acpi/evged.c:105:48: warning: format specifies type 'unsigned
char' but the argument has type 'unsigned int' [-Wformat]
trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
^~~

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Fixes: ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Nick Desaulniers and committed by
Rafael J. Wysocki
9debfb81 c6237b21

+1 -1
+1 -1
drivers/acpi/evged.c
··· 101 101 102 102 switch (gsi) { 103 103 case 0 ... 255: 104 - sprintf(ev_name, "_%c%02hhX", 104 + sprintf(ev_name, "_%c%02X", 105 105 trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi); 106 106 107 107 if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))