mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] PM: Use %pe to print error pointers symbolically
@ 2026-09-12 19:11 Sumeet Pawnikar
  2026-09-12 19:11 ` [PATCH v2 1/5] power: " Sumeet Pawnikar
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sumeet Pawnikar @ 2026-09-12 19:11 UTC (permalink / raw)
  To: rafael, krzk, amit.kachhap, daniel.lezcano, thara.gopinath,
	talel, hayashi.kunihiko, mhiramat, mmayer, viresh.kumar, sumitg,
	peter.griffin, myungjoo.ham, kyungmin.park, cw00.choi, Frank.Li,
	s.hauer, matthias.bgg, angelogioacchino.delregno, sven, j,
	marcan, casey.connolly, sre, wens, t.schramm
  Cc: bcm-kernel-feedback-list, linux-samsung-soc, kernel, imx,
	linux-mediatek, linux-arm-kernel, linux-arm-msm, linux-pm,
	linux-kernel, sumeet4linux

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@gmail.com/

---

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-12 19:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12 19:11 [PATCH v2 0/5] PM: Use %pe to print error pointers symbolically Sumeet Pawnikar
2026-09-12 19:11 ` [PATCH v2 1/5] power: " Sumeet Pawnikar
2026-09-12 19:11 ` [PATCH v2 2/5] devfreq: " Sumeet Pawnikar
2026-09-12 19:11 ` [PATCH v2 3/5] cpufreq: " Sumeet Pawnikar
2026-09-12 19:11 ` [PATCH v2 4/5] thermal: " Sumeet Pawnikar
2026-09-12 19:11 ` [PATCH v2 5/5] powercap: intel_rapl: " Sumeet Pawnikar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®