* [PATCH] HID: pulsar: print the battery error with %pe
@ 2026-11-04 15:00 Aryan Sinha
2026-11-05 13:08 ` Nikolas Koesling
0 siblings, 1 reply; 2+ messages in thread
From: Aryan Sinha @ 2026-11-04 15:00 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: Nikolas Koesling, linux-input, linux-kernel, Aryan Sinha
%pe prints the symbolic errno, which is easier to read than the raw
number from the PTR_ERR().
Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
drivers/hid/hid-pulsar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-pulsar.c b/drivers/hid/hid-pulsar.c
index b0b34849f..ba7cc9f65 100644
--- a/drivers/hid/hid-pulsar.c
+++ b/drivers/hid/hid-pulsar.c
@@ -615,8 +615,8 @@ static void pulsar_init_work(struct work_struct *work)
devm_power_supply_register(&hdev->dev, &drvdata->battery.desc,
&psy_cfg);
if (IS_ERR(drvdata->battery.ps)) {
- hid_err(hdev, "failed to register battery: %ld\n",
- PTR_ERR(drvdata->battery.ps));
+ hid_err(hdev, "failed to register battery: %pe\n",
+ drvdata->battery.ps);
drvdata->battery.ps = NULL;
return;
}
--
2.46.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: pulsar: print the battery error with %pe
2026-11-04 15:00 [PATCH] HID: pulsar: print the battery error with %pe Aryan Sinha
@ 2026-11-05 13:08 ` Nikolas Koesling
0 siblings, 0 replies; 2+ messages in thread
From: Nikolas Koesling @ 2026-11-05 13:08 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Aryan Sinha
Cc: linux-input, linux-kernel, Aryan Sinha
Hi Aryan,
thanks for the patch, the change itself looks good.
However, it only converts one of the error prints in the driver. The remaining
ones still print the plain errno with %d. they can use %pe with ERR_PTR(ret)
as well.
Could you send a v2 that converts all of them, so the driver reports errors
consistently?
Thanks,
Nikolas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:00 [PATCH] HID: pulsar: print the battery error with %pe Aryan Sinha
2026-11-05 13:08 ` Nikolas Koesling
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®