powercap: intel_rapl: Use %pe to print error pointers symbolically

Replace PTR_ERR() and %ld with %pe and pass the original pointer directly
to pr_debug(). The %pe format specifier prints a symbolic error name
(e.g. -ENOMEM) when CONFIG_SYMBOLIC_ERRNAME is enabled, otherwise it falls
back gracefully and prints the raw integer value. This makes messages more
readable without any functional change.

Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
Link: https://patch.msgid.link/20260912191156.185448-6-sumeet4linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Sumeet Pawnikar 2026-09-13 00:41:55 +05:30 committed by Rafael J. Wysocki
parent 18f64d8ca6
commit 459199ccd1

View File

@ -583,8 +583,8 @@ static int intel_rapl_msr_init(void)
rapl_msr_platdev = platform_device_register_data(NULL, "intel_rapl_msr", 0, def,
sizeof(*def));
if (IS_ERR(rapl_msr_platdev))
pr_debug("intel_rapl_msr device register failed, ret:%ld\n",
PTR_ERR(rapl_msr_platdev));
pr_debug("intel_rapl_msr device register failed, ret:%pe\n",
rapl_msr_platdev);
return 0;
}