Re: [PATCH v2 1/5] ACPI: AC: Clean up printing messages

2021-02-03 Thread Rafael J. Wysocki
On Wednesday, February 3, 2021 2:31:08 AM CET Hanjun Guo wrote:
> Hi Rafael,
> 
> On 2021/2/3 2:14, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki 
> > 
> > Replace the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances
> > in ac.c with acpi_handle_debug() and acpi_handle_info() calls,
> > respectively, which among other things causes the excessive log
> > level of the messages previously printed via ACPI_EXCEPTION() to
> > be more adequate.
> > 
> > Drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not
> > used any more, drop the no longer needed ACPI_AC_COMPONENT definition
> > from the headers and update the documentation accordingly.
> > 
> > Signed-off-by: Rafael J. Wysocki 
> > ---
> > 
> > v1 -> v2: Changelog update
> > 
> > ---
> >   Documentation/firmware-guide/acpi/debug.rst |1 -
> >   drivers/acpi/ac.c   |   12 +---
> >   drivers/acpi/sysfs.c|1 -
> >   include/acpi/acpi_drivers.h |1 -
> >   4 files changed, 5 insertions(+), 10 deletions(-)
> > 
> > Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
> > ===
> > --- linux-pm.orig/Documentation/firmware-guide/acpi/debug.rst
> > +++ linux-pm/Documentation/firmware-guide/acpi/debug.rst
> > @@ -52,7 +52,6 @@ shows the supported mask values, current
> >   ACPI_CA_DISASSEMBLER0x0800
> >   ACPI_COMPILER   0x1000
> >   ACPI_TOOLS  0x2000
> > -ACPI_AC_COMPONENT   0x0002
> >   ACPI_BATTERY_COMPONENT  0x0004
> >   ACPI_BUTTON_COMPONENT   0x0008
> >   ACPI_SBS_COMPONENT  0x0010
> > Index: linux-pm/drivers/acpi/ac.c
> > ===
> > --- linux-pm.orig/drivers/acpi/ac.c
> > +++ linux-pm/drivers/acpi/ac.c
> 
> In this file, printk() is still using, how about convert them
> all into pr_*? I think patch on top your or update this patch
> are both OK.

Good idea.

Thanks for all of the comments.  They will be addressed in the v3 that will be
posted shortly.





Re: [PATCH v2 1/5] ACPI: AC: Clean up printing messages

2021-02-02 Thread Hanjun Guo

Hi Rafael,

On 2021/2/3 2:14, Rafael J. Wysocki wrote:

From: Rafael J. Wysocki 

Replace the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances
in ac.c with acpi_handle_debug() and acpi_handle_info() calls,
respectively, which among other things causes the excessive log
level of the messages previously printed via ACPI_EXCEPTION() to
be more adequate.

Drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not
used any more, drop the no longer needed ACPI_AC_COMPONENT definition
from the headers and update the documentation accordingly.

Signed-off-by: Rafael J. Wysocki 
---

v1 -> v2: Changelog update

---
  Documentation/firmware-guide/acpi/debug.rst |1 -
  drivers/acpi/ac.c   |   12 +---
  drivers/acpi/sysfs.c|1 -
  include/acpi/acpi_drivers.h |1 -
  4 files changed, 5 insertions(+), 10 deletions(-)

Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
===
--- linux-pm.orig/Documentation/firmware-guide/acpi/debug.rst
+++ linux-pm/Documentation/firmware-guide/acpi/debug.rst
@@ -52,7 +52,6 @@ shows the supported mask values, current
  ACPI_CA_DISASSEMBLER0x0800
  ACPI_COMPILER   0x1000
  ACPI_TOOLS  0x2000
-ACPI_AC_COMPONENT   0x0002
  ACPI_BATTERY_COMPONENT  0x0004
  ACPI_BUTTON_COMPONENT   0x0008
  ACPI_SBS_COMPONENT  0x0010
Index: linux-pm/drivers/acpi/ac.c
===
--- linux-pm.orig/drivers/acpi/ac.c
+++ linux-pm/drivers/acpi/ac.c


In this file, printk() is still using, how about convert them
all into pr_*? I think patch on top your or update this patch
are both OK.

Thanks
Hanjun