Skip to content

Commit 9debfb8

Browse files
nickdesaulniersrafaeljw
authored andcommitted
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: ClangBuiltLinux#378 Fixes: ea6f3af ("ACPI: GED: add support for _Exx / _Lxx handler methods") Acked-by: Ard Biesheuvel <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c6237b2 commit 9debfb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/evged.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
101101

102102
switch (gsi) {
103103
case 0 ... 255:
104-
sprintf(ev_name, "_%c%02hhX",
104+
sprintf(ev_name, "_%c%02X",
105105
trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
106106

107107
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))

0 commit comments

Comments
 (0)