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

From: Sumeet Pawnikar

Date: Sat Sep 12 2026 - 15:12:25 EST


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/20260906061755.5103-1-sumeet4linux@xxxxxxxxx/

---

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

--
2.43.0