2021-01-27 20:53:02

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the pm tree

Hi all,

After merging the pm tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

In file included from include/linux/printk.h:7,
from include/linux/kernel.h:16,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/acpi/acpi_fpdt.c:11:
drivers/acpi/acpi_fpdt.c: In function 'acpi_init_fpdt':
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:373:9: note: in expansion of macro 'KERN_INFO'
373 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro 'pr_info'
255 | pr_info(FW_BUG, "Invalid subtable type %d found.\n",
| ^~~~~~~

Introduced by commit

208757d71098 ("ACPI: tables: introduce support for FPDT table")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-27 21:23:11

by Zhang Rui

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pm tree

Hi, Stephen,

Sorry that I missed this build warning in the first place, thanks for
reporting.
The patch below fixes it.

BTW, Rafael, I think acpi_fpdt_init() also needs to be fixed to have
proper return value.
Do you prefer an incremental patch or a V2 of 208757d71098 ("ACPI:
tables: introduce support for FPDT table"), which includes all these
fixes?

thanks,
rui

From 2b8ed148351875b4bf227602a97edba12d08af7e Mon Sep 17 00:00:00 2001
From: Zhang Rui <[email protected]>
Date: Wed, 27 Jan 2021 11:33:33 +0800
Subject: [PATCH] ACPI: FPDT: fix build warning

Fix a build warning,
In file included from ./include/linux/printk.h:7:0,
from ./include/linux/kernel.h:16,
from ./include/linux/list.h:9,
from ./include/linux/kobject.h:19,
from ./include/linux/of.h:17,
from ./include/linux/irqdomain.h:35,
from ./include/linux/acpi.h:13,
from drivers/acpi/acpi_fpdt.c:11:
drivers/acpi/acpi_fpdt.c: In function ‘acpi_init_fpdt’:
./include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
./include/linux/kern_levels.h:14:19: note: in expansion of macro ‘KERN_SOH’
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
./include/linux/printk.h:373:9: note: in expansion of macro ‘KERN_INFO’
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro ‘pr_info’
pr_info(FW_BUG, "Invalid subtable type %d found.\n",
^~~~~~~

Signed-off-by: Zhang Rui <[email protected]>
---
drivers/acpi/acpi_fpdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_fpdt.c b/drivers/acpi/acpi_fpdt.c
index b8108117262a..64d5733dca0b 100644
--- a/drivers/acpi/acpi_fpdt.c
+++ b/drivers/acpi/acpi_fpdt.c
@@ -252,7 +252,7 @@ void acpi_init_fpdt(void)
subtable->type);
break;
default:
- pr_info(FW_BUG, "Invalid subtable type %d found.\n",
+ pr_info(FW_BUG "Invalid subtable type %d found.\n",
subtable->type);
return;
}
--
2.17.1


On Wed, 2021-01-27 at 12:43 +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the pm tree, today's linux-next build (x86_64
> allmodconfig)
> produced this warning:
>
> In file included from include/linux/printk.h:7,
> from include/linux/kernel.h:16,
> from include/linux/list.h:9,
> from include/linux/kobject.h:19,
> from include/linux/of.h:17,
> from include/linux/irqdomain.h:35,
> from include/linux/acpi.h:13,
> from drivers/acpi/acpi_fpdt.c:11:
> drivers/acpi/acpi_fpdt.c: In function 'acpi_init_fpdt':
> include/linux/kern_levels.h:5:18: warning: too many arguments for
> format [-Wformat-extra-args]
> 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
> | ^~~~~~
> include/linux/kern_levels.h:14:19: note: in expansion of macro
> 'KERN_SOH'
> 14 | #define KERN_INFO KERN_SOH "6" /* informational */
> | ^~~~~~~~
> include/linux/printk.h:373:9: note: in expansion of macro 'KERN_INFO'
> 373 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~~~
> drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro 'pr_info'
> 255 | pr_info(FW_BUG, "Invalid subtable type %d found.\n",
> | ^~~~~~~
>
> Introduced by commit
>
> 208757d71098 ("ACPI: tables: introduce support for FPDT table")
>