* [PATCH -next] acpi: fpdt: drop errant comma in pr_info()
@ 2021-01-28 23:25 Randy Dunlap
2021-01-28 23:56 ` Joe Perches
2021-01-29 6:24 ` Zhang Rui
0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-01-28 23:25 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Rafael J. Wysocki, Rafael J . Wysocki, Len Brown,
linux-acpi, Zhang Rui
Drop a mistaken comma in the pr_info() args to prevent the
build warning.
../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]
../drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro 'pr_info'
pr_info(FW_BUG, "Invalid subtable type %d found.\n",
Fixes: 208757d71098 ("ACPI: tables: introduce support for FPDT table")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/acpi_fpdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20210128.orig/drivers/acpi/acpi_fpdt.c
+++ linux-next-20210128/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;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] acpi: fpdt: drop errant comma in pr_info()
2021-01-28 23:25 [PATCH -next] acpi: fpdt: drop errant comma in pr_info() Randy Dunlap
@ 2021-01-28 23:56 ` Joe Perches
2021-01-29 6:18 ` Zhang Rui
2021-01-29 6:24 ` Zhang Rui
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2021-01-28 23:56 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Rafael J. Wysocki, Rafael J . Wysocki, Len Brown, linux-acpi, Zhang Rui
On Thu, 2021-01-28 at 15:25 -0800, Randy Dunlap wrote:
> Drop a mistaken comma in the pr_info() args to prevent the
> build warning.
>
> ../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]
> ../drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro 'pr_info'
> pr_info(FW_BUG, "Invalid subtable type %d found.\n",
[]
> --- linux-next-20210128.orig/drivers/acpi/acpi_fpdt.c
> +++ linux-next-20210128/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);
Another question would be why is the pr_info when all the other
FW_BUG uses in this file are pr_err
One would think it's at least a defect of some time.
I would think it should at least be pr_notice or pr_warn
Documentation/admin-guide/kernel-parameters.txt- 1 (KERN_ALERT) action must be taken immediately
Documentation/admin-guide/kernel-parameters.txt- 2 (KERN_CRIT) critical conditions
Documentation/admin-guide/kernel-parameters.txt- 3 (KERN_ERR) error conditions
Documentation/admin-guide/kernel-parameters.txt- 4 (KERN_WARNING) warning conditions
Documentation/admin-guide/kernel-parameters.txt- 5 (KERN_NOTICE) normal but significant condition
Documentation/admin-guide/kernel-parameters.txt: 6 (KERN_INFO) informational
Documentation/admin-guide/kernel-parameters.txt- 7 (KERN_DEBUG) debug-level messages
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] acpi: fpdt: drop errant comma in pr_info()
2021-01-28 23:56 ` Joe Perches
@ 2021-01-29 6:18 ` Zhang Rui
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2021-01-29 6:18 UTC (permalink / raw)
To: Joe Perches, Randy Dunlap, linux-kernel
Cc: Rafael J. Wysocki, Rafael J . Wysocki, Len Brown, linux-acpi
On Thu, 2021-01-28 at 15:56 -0800, Joe Perches wrote:
> On Thu, 2021-01-28 at 15:25 -0800, Randy Dunlap wrote:
> > Drop a mistaken comma in the pr_info() args to prevent the
> > build warning.
> >
> > ../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]
> > ../drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro
> > 'pr_info'
> > pr_info(FW_BUG, "Invalid subtable type %d found.\n",
>
> []
> > --- linux-next-20210128.orig/drivers/acpi/acpi_fpdt.c
> > +++ linux-next-20210128/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);
>
> Another question would be why is the pr_info when all the other
> FW_BUG uses in this file are pr_err
>
Here, this FW_BUG just means an unrecognized subtable is found, and it
should not affect the other subtables that are already supported by
this driver. So that's why we didn't use pr_err.
In fact, I've just posted a V2 patch,
https://patchwork.kernel.org/project/linux-acpi/patch/20210129061548.13448-1-rui.zhang@intel.com/
and I prefer to continue processing even if this FW_BUG is detected.
> One would think it's at least a defect of some time.
> I would think it should at least be pr_notice or pr_warn
I'm also okay with pr_notice/pr_warn here.
This FW_BUG should be really rare.
thanks,
rui
>
> Documentation/admin-guide/kernel
> -parameters.txt- 1
> (KERN_ALERT) action must be taken immediately
> Documentation/admin-guide/kernel
> -parameters.txt- 2
> (KERN_CRIT) critical conditions
> Documentation/admin-guide/kernel
> -parameters.txt- 3 (KERN_ERR) error
> conditions
> Documentation/admin-guide/kernel
> -parameters.txt- 4
> (KERN_WARNING) warning conditions
> Documentation/admin-guide/kernel
> -parameters.txt- 5
> (KERN_NOTICE) normal but significant condition
> Documentation/admin-guide/kernel-
> parameters.txt: 6
> (KERN_INFO) informational
> Documentation/admin-guide/kernel
> -parameters.txt- 7
> (KERN_DEBUG) debug-level messages
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] acpi: fpdt: drop errant comma in pr_info()
2021-01-28 23:25 [PATCH -next] acpi: fpdt: drop errant comma in pr_info() Randy Dunlap
2021-01-28 23:56 ` Joe Perches
@ 2021-01-29 6:24 ` Zhang Rui
1 sibling, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2021-01-29 6:24 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Rafael J. Wysocki, Rafael J . Wysocki, Len Brown, linux-acpi
Hi, Randy,
Thanks for the patch, a similar patch has been posted earlier, but I
forgot to cc linux-acpi mailing list.
https://marc.info/?l=linux-next&m=161172750710666&w=2
Now given that there are a couple of fixes needed for the original
patch, I just refreshed the original patch to include all the fixes.
https://patchwork.kernel.org/project/linux-acpi/patch/20210129061548.13448-1-rui.zhang@intel.com/
thanks,
rui
On Thu, 2021-01-28 at 15:25 -0800, Randy Dunlap wrote:
> Drop a mistaken comma in the pr_info() args to prevent the
> build warning.
>
> ../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]
> ../drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro
> 'pr_info'
> pr_info(FW_BUG, "Invalid subtable type %d found.\n",
>
> Fixes: 208757d71098 ("ACPI: tables: introduce support for FPDT
> table")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> Cc: linux-acpi@vger.kernel.org
> Cc: Zhang Rui <rui.zhang@intel.com>
> ---
> drivers/acpi/acpi_fpdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20210128.orig/drivers/acpi/acpi_fpdt.c
> +++ linux-next-20210128/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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-29 6:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 23:25 [PATCH -next] acpi: fpdt: drop errant comma in pr_info() Randy Dunlap
2021-01-28 23:56 ` Joe Perches
2021-01-29 6:18 ` Zhang Rui
2021-01-29 6:24 ` Zhang Rui
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.