lkml.org 
[lkml]   [2021]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 2/5] ACPI: battery: Clean up printing messages
On Tue, Feb 2, 2021 at 2:38 PM Joe Perches <joe@perches.com> wrote:
>
> On Mon, 2021-02-01 at 19:44 +0100, Rafael J. Wysocki wrote:
> > On Mon, Feb 1, 2021 at 7:37 PM Joe Perches <joe@perches.com> wrote:
> > >
> > > On Mon, 2021-02-01 at 19:16 +0100, Rafael J. Wysocki wrote:
> > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > >
> > > > Replace the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances
> > > > in battery.c with acpi_handle_debug() and acpi_handle_info() calls,
> > > > respectively, drop the _COMPONENT and ACPI_MODULE_NAME() definitions
> > > > that are not used any more, drop the no longer needed
> > > > ACPI_BATTERY_COMPONENT definition from the headers and update the
> > > > documentation accordingly.
> > > >
> > > > While at it, update the pr_fmt() definition and drop the unneeded
> > > > PREFIX sybmbol definition from battery.c.
> > > []
> > > > --- linux-pm.orig/drivers/acpi/battery.c
> > > []
> > > > @@ -466,7 +460,8 @@ static int extract_package(struct acpi_b
> > > > static int acpi_battery_get_status(struct acpi_battery *battery)
> > > > {
> > > > if (acpi_bus_get_status(battery->device)) {
> > > > - ACPI_EXCEPTION((AE_INFO, AE_ERROR, "Evaluating _STA"));
> > > > + acpi_handle_info(battery->device->handle,
> > > > + "_STA evaluation failed\n");
> > >
> > > I believe this changes the logging level from KERN_ERR to KERN_INFO.
> > >
> > > Perhaps this and others should instead use acpi_handle_err()
> >
> > Actually, these log level changes, because the messages in question
> > are not very urgent.
> >
> > Something doesn't work and it's kind of good to know that, but there's
> > not much that can be done about it.
>
> That more argues for removal of KERN_<LEVEL> filtering.
>
> I fail to see how difficult it is to change these to the existing
> KERN_<LEVEL> using a simple acpi_handle_info() -> acpi_handle_err()
> substitution where appropriate.

I'm not really sure what you mean.

It is not a technical problem, but in my view the KERN_ERR log level
is excessive for these messages.

> At a minimum, the commit message should note the KERN_<LEVEL> changes.

OK, let me update the changelogs, then.

\
 
 \ /
  Last update: 2021-02-02 15:20    [W:0.075 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site