Skip to content

ACPI: Further cleanups for message printing

Hanjun Guo linux-acpi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18ACPI: cmos_rtc: Using pr_fmt() and remove PREFIXdrivers/acpi/acpi_cmos_rtc.c+4 -20 replies
2/18ACPI: blacklist: Unify the message printingdrivers/acpi/blacklist.c+5 -40 replies
3/18ACPI: bus: Use pr_*() macros to replace printk()drivers/acpi/bus.c+2 -20 replies
4/18ACPI: event: Use pr_*() macros to replace printk()drivers/acpi/event.c+4 -20 replies
5/18ACPI: glue: Clean up the printing messagesdrivers/acpi/glue.c+9 -200 replies
6/18ACPI: nvs: Unify the message printingdrivers/acpi/nvs.c+5 -30 replies
7/18ACPI: osl: Remove the duplicated PREFIX for message printingdrivers/acpi/osl.c+2 -20 replies
8/18ACPI: pci_root: Unify the message printingdrivers/acpi/pci_root.c+3 -10 replies
9/18ACPI: processor_thermal: Remove unused PREFIX for printingdrivers/acpi/processor_thermal.c+0 -20 replies
10/18ACPI: processor_perflib: Cleanup print messagesdrivers/acpi/processor_perflib.c+18 -200 replies
11/18ACPI: processor_throttling: Cleanup the printing messagesdrivers/acpi/processor_throttling.c+26 -340 replies
12/18ACPI: reboot: Unify the message printingdrivers/acpi/reboot.c+3 -10 replies
13/18ACPI: sysfs: Cleanup message printingdrivers/acpi/sysfs.c+3 -50 replies
14/18ACPI: sbshc: Unify the message printingdrivers/acpi/sbshc.c+4 -40 replies
15/18ACPI: scan: Unify the log message printingdrivers/acpi/scan.c+6 -50 replies
16/18ACPI: sbs: Unify the message printingdrivers/acpi/sbs.c+6 -60 replies
17/18ACPI: sleep: Unify the message printingdrivers/acpi/sleep.c+9 -90 replies
18/18ACPI: Remove the macro PREFIX "ACPI: "drivers/acpi/internal.h+0 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/18] ACPI: Further cleanups for message printing

After the message printing cleanups to decouple with ACPICA, the message printing in ACPI subsystem still have the room for improvement. For now we use both PREFIX "ACPI: " and pr_*() macros for message print in ACPI subsystem, they are misused in follwing ways:

- Duplicated prefix. For example in sysfs.c we have pr_fmt() but we still use pr_err(PREFIX ...), which is worng;

- Using pr_*() macros without pr_fmt(), but some pr_*() calls added the PREFIX and some didn't in the same file;

- Mixed use of printk(PREFIX) and pr_*() macros in one driver but don't have the same prefix for message printing.

All the above will confuse people, sometimes leads to write some wrong message printing code, so just use pr_fmt() and pr_*() macros to generate a unified format string, and remove the using of PREFIX "ACPI: " in ACPI drivers, finally remove PREFIX "ACPI: " definition in the internal.h, which prevent further misuse of the PREFIX.

Also remove some in-house DBG code which is not useful, replace with pr_debug() instead.

Hanjun Guo (18):
ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX
ACPI: blacklist: Unify the message printing
ACPI: bus: Use pr_*() macros to replace printk()
ACPI: event: Use pr_*() macros to replace printk()
ACPI: glue: Clean up the printing messages
ACPI: nvs: Unify the message printing
ACPI: osl: Remove the duplicated PREFIX for message printing
ACPI: pci_root: Unify the message printing
ACPI: processor_thermal: Remove unused PREFIX for printing
ACPI: processor_perflib: Cleanup print messages
ACPI: processor_throttling: Cleanup the printing messages
ACPI: reboot: Unify the message printing
ACPI: sysfs: Cleanup message printing
ACPI: sbshc: Unify the message printing
ACPI: scan: Unify the log message printing
ACPI: sbs: Unify the message printing
ACPI: sleep: Unify the message printing
ACPI: Remove the macro PREFIX "ACPI: "

 drivers/acpi/acpi_cmos_rtc.c        |  6 ++--
 drivers/acpi/blacklist.c            |  9 +++---
 drivers/acpi/bus.c                  |  4 +--
 drivers/acpi/event.c                |  6 ++--
 drivers/acpi/glue.c                 | 29 ++++++------------
 drivers/acpi/internal.h             |  2 --
 drivers/acpi/nvs.c                  |  8 +++--
 drivers/acpi/osl.c                  |  4 +--
 drivers/acpi/pci_root.c             |  4 ++-
 drivers/acpi/processor_perflib.c    | 38 +++++++++++------------
 drivers/acpi/processor_thermal.c    |  2 --
 drivers/acpi/processor_throttling.c | 60 ++++++++++++++++---------------------
 drivers/acpi/reboot.c               |  4 ++-
 drivers/acpi/sbs.c                  | 12 ++++----
 drivers/acpi/sbshc.c                |  8 ++---
 drivers/acpi/scan.c                 | 11 +++----
 drivers/acpi/sleep.c                | 18 +++++------
 drivers/acpi/sysfs.c                |  8 ++---
 18 files changed, 109 insertions(+), 124 deletions(-)
Signature · 1 line
1.7.12.4