* [PATCH] ACPI: GED: fix -Wformat
@ 2020-11-07 8:34 Nick Desaulniers
2020-11-07 8:37 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Nick Desaulniers @ 2020-11-07 8:34 UTC (permalink / raw)
To: Rafael J . Wysocki, Len Brown
Cc: Ard Biesheuvel, Nick Desaulniers, Nathan Chancellor, linux-acpi,
linux-kernel, clang-built-linux
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: commit ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
drivers/acpi/evged.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
index b1a7f8d6965e..fe6b6792c8bb 100644
--- a/drivers/acpi/evged.c
+++ b/drivers/acpi/evged.c
@@ -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)))
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: GED: fix -Wformat
2020-11-07 8:34 [PATCH] ACPI: GED: fix -Wformat Nick Desaulniers
@ 2020-11-07 8:37 ` Ard Biesheuvel
2020-11-07 8:49 ` [PATCH v2] " Nick Desaulniers
0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2020-11-07 8:37 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Rafael J . Wysocki, Len Brown, Nathan Chancellor,
ACPI Devel Maling List, Linux Kernel Mailing List,
clang-built-linux
On Sat, 7 Nov 2020 at 09:34, Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> 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: commit ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
Please drop the word 'commit' here
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> drivers/acpi/evged.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
> index b1a7f8d6965e..fe6b6792c8bb 100644
> --- a/drivers/acpi/evged.c
> +++ b/drivers/acpi/evged.c
> @@ -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)))
> --
> 2.29.2.222.g5d2a92d10f8-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ACPI: GED: fix -Wformat
2020-11-07 8:37 ` Ard Biesheuvel
@ 2020-11-07 8:49 ` Nick Desaulniers
2020-11-09 18:27 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Nick Desaulniers @ 2020-11-07 8:49 UTC (permalink / raw)
To: Rafael J . Wysocki, Len Brown
Cc: Ard Biesheuvel, Nick Desaulniers, Nathan Chancellor, linux-acpi,
linux-kernel, clang-built-linux
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>
---
drivers/acpi/evged.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
index b1a7f8d6965e..fe6b6792c8bb 100644
--- a/drivers/acpi/evged.c
+++ b/drivers/acpi/evged.c
@@ -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)))
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ACPI: GED: fix -Wformat
2020-11-07 8:49 ` [PATCH v2] " Nick Desaulniers
@ 2020-11-09 18:27 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2020-11-09 18:27 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Rafael J . Wysocki, Len Brown, Ard Biesheuvel, Nathan Chancellor,
ACPI Devel Maling List, Linux Kernel Mailing List,
clang-built-linux
On Sat, Nov 7, 2020 at 9:49 AM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> 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>
> ---
> drivers/acpi/evged.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
> index b1a7f8d6965e..fe6b6792c8bb 100644
> --- a/drivers/acpi/evged.c
> +++ b/drivers/acpi/evged.c
> @@ -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)))
> --
Applied as 5.10-rc material, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-09 18:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 8:34 [PATCH] ACPI: GED: fix -Wformat Nick Desaulniers
2020-11-07 8:37 ` Ard Biesheuvel
2020-11-07 8:49 ` [PATCH v2] " Nick Desaulniers
2020-11-09 18:27 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.