[PATCH 0/5] PM: Use %pe to print error pointers symbolically
From: Sumeet Pawnikar
Date: Sun Sep 06 2026 - 02:18:21 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, intel_rapl_tpmi)
* thermal (core, cpufreq_cooling, devfreq_cooling, mmio, etc.)
* cpufreq (bmips, cppc, qoriq, s3c64xx)
* devfreq (imx-bus, imx8m-ddrc, mtk-cci)
* power/supply (various battery and charger drivers)
Sumeet Pawnikar (5):
powercap: intel_rapl: Use %pe to print error pointers symbolically
thermal: Use %pe to print error pointers symbolically
cpufreq: Use %pe to print error pointers symbolically
devfreq: Use %pe to print error pointers symbolically
power: 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/devfreq/mtk-cci-devfreq.c | 4 ++--
drivers/power/reset/macsmc-reboot.c | 4 ++--
drivers/power/supply/axp20x_battery.c | 4 ++--
drivers/power/supply/cpcap-charger.c | 4 ++--
drivers/power/supply/cw2015_battery.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/powercap/intel_rapl_tpmi.c | 4 ++--
drivers/thermal/cpufreq_cooling.c | 4 ++--
drivers/thermal/devfreq_cooling.c | 4 ++--
drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 4 ++--
drivers/thermal/thermal_mmio.c | 3 +--
drivers/thermal/uniphier_thermal.c | 3 +--
20 files changed, 35 insertions(+), 39 deletions(-)
--
2.43.0