Skip to content

Commit

Permalink
ACPI: GED: fix -Wformat
Browse files Browse the repository at this point in the history
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/linux#378
Fixes: ea6f3af ("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>
  • Loading branch information
nickdesaulniers authored and rafaeljw committed Nov 9, 2020
1 parent c6237b2 commit 9debfb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/evged.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,

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

if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
Expand Down

0 comments on commit 9debfb8

Please sign in to comment.