Skip to content

PM: Use %pe to print error pointers symbolically

Sumeet Pawnikar imx linux-arm-kernel linux-arm-msm linux-mediatek linux-pm linux-samsung-soc lkml 2 versions – Applied

Status from this message: Applied as 7.4 material, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesApplied
  2. v15 patches 7 repliesApplied

Changes in v2 from the cover letter

- Krzysztof kozlowski suggested to use dev_err_probe instead of dev_err for *_probe() functions during review of v1 series. This will be done in different patch series.
- Here in v2, reverted the changes for dev_err under *_probe() functions.

- Link to v1: https://lore.kernel.org/all/[email protected]/

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5power: Use %pe to print error pointers symbolicallydrivers/power/reset/macsmc-reboot.c drivers/power/supply/cpcap-charger.c drivers/power/supply/intel_dc_ti_battery.c +1 more+6 -60 replies
2/5devfreq: Use %pe to print error pointers symbolicallydrivers/devfreq/imx-bus.c drivers/devfreq/imx8m-ddrc.c+3 -42 replies
3/5cpufreq: Use %pe to print error pointers symbolicallydrivers/cpufreq/bmips-cpufreq.c drivers/cpufreq/cppc_cpufreq.c drivers/cpufreq/qoriq-cpufreq.c +1 more+8 -91 reply
4/5thermal: Use %pe to print error pointers symbolicallydrivers/thermal/cpufreq_cooling.c drivers/thermal/devfreq_cooling.c drivers/thermal/qcom/qcom-spmi-adc-tm5.c+6 -61 reply
5/5powercap: intel_rapl: Use %pe to print error pointers symbolicallydrivers/powercap/intel_rapl_msr.c+2 -21 reply

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchKrzysztof Kozlowski
1/5
2/5R-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] PM: Use %pe to print error pointers symbolically

This patch series is a cleanup for subsystems under power management (linux-pm) that converts several instances of error pointer printing to use the %pe format specifier instead of explicitly casting with PTR_ERR().

Currently, many drivers use PTR_ERR() paired with %ld or %li to print error codes returned as pointers. By switching to %pe and passing the error pointer directly, the logging subsystem will automatically print the symbolic error name (e.g., -ENOMEM, -EPROBE_DEFER) when CONFIG_SYMBOLIC_ERRNAME is enabled, and gracefully fall back to the numeric value otherwise.

This change significantly improves the readability of kernel logs and dmesg traces during debugging, without introducing any functional changes or side effects.

The cleanup has been applied across the following PM subsystems/drivers:
* powercap (intel_rapl_msr)
* thermal (cpufreq_cooling, devfreq_cooling, qcom)
* cpufreq (bmips, cppc, qoriq, s3c64xx)
* devfreq (imx-bus, imx8m-ddrc)
* power/supply (various battery and charger drivers)

---
changes in v2:
- Krzysztof kozlowski suggested to use dev_err_probe instead of dev_err for *_probe() functions during review of v1 series. This will be done in different patch series.
- Here in v2, reverted the changes for dev_err under *_probe() functions.

- Link to v1: https://lore.kernel.org/all/[email protected]/

---

Sumeet Pawnikar (5):
power: Use %pe to print error pointers symbolically
devfreq: Use %pe to print error pointers symbolically
cpufreq: Use %pe to print error pointers symbolically
thermal: Use %pe to print error pointers symbolically
powercap: intel_rapl: Use %pe to print error pointers symbolically

 drivers/cpufreq/bmips-cpufreq.c            | 4 ++--
 drivers/cpufreq/cppc_cpufreq.c             | 4 ++--
 drivers/cpufreq/qoriq-cpufreq.c            | 4 ++--
 drivers/cpufreq/s3c64xx-cpufreq.c          | 5 ++---
 drivers/devfreq/imx-bus.c                  | 4 ++--
 drivers/devfreq/imx8m-ddrc.c               | 3 +--
 drivers/power/reset/macsmc-reboot.c        | 4 ++--
 drivers/power/supply/cpcap-charger.c       | 4 ++--
 drivers/power/supply/intel_dc_ti_battery.c | 2 +-
 drivers/power/supply/qcom_smbx.c           | 2 +-
 drivers/powercap/intel_rapl_msr.c          | 4 ++--
 drivers/thermal/cpufreq_cooling.c          | 4 ++--
 drivers/thermal/devfreq_cooling.c          | 4 ++--
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c   | 4 ++--
 14 files changed, 25 insertions(+), 27 deletions(-)
Signature · 1 line
2.43.0