From: Aryan Sinha <sinha.aryan03@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Nikolas Koesling <nikolas@koesling.info>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Aryan Sinha <sinha.aryan03@gmail.com>
Subject: [PATCH] HID: pulsar: print the battery error with %pe
Date: Wed, 4 Nov 2026 20:30:52 +0530 [thread overview]
Message-ID: <20261104150055.33028-1-sinha.aryan03@gmail.com> (raw)
%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
reply other threads:[~2026-11-04 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261104150055.33028-1-sinha.aryan03@gmail.com \
--to=sinha.aryan03@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikolas@koesling.info \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®