All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Joe Perches <joe@perches.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH -next] acpi: fpdt: drop errant comma in pr_info()
Date: Fri, 29 Jan 2021 14:18:39 +0800	[thread overview]
Message-ID: <b472e686163f21624d6bafd3db0807f7ef0f8ff0.camel@intel.com> (raw)
In-Reply-To: <955a079a3d15228ce9aeba8720dccae2dc7dfb7c.camel@perches.com>

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
> 
> 


  reply	other threads:[~2021-01-29  6:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-01-29  6:24 ` Zhang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b472e686163f21624d6bafd3db0807f7ef0f8ff0.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=joe@perches.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rdunlap@infradead.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.