From: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
To: David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>
Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
Subject: [PATCH] afs: use %pe to print error pointers in security.c
Date: Mon, 8 Jun 2026 21:16:48 +0500 [thread overview]
Message-ID: <20260608161648.14954-1-mahad.ibrahim.dev@gmail.com> (raw)
The error pointer returned by afs_request_key() and friends was printed via
%ld. This printed a raw negative errno, %pe prints the raw error
pointer directly so the symbolic error name is printed instead.
Replace %ld and PTR_ERR with %pe to improve readability of debug output.
Compile tested only.
Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
---
fs/afs/security.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/afs/security.c b/fs/afs/security.c
index 6d00d62a65ed..ec39c49f01b9 100644
--- a/fs/afs/security.c
+++ b/fs/afs/security.c
@@ -57,7 +57,7 @@ struct key *afs_request_key(struct afs_cell *cell)
cell->net->net, NULL);
if (IS_ERR(key)) {
if (PTR_ERR(key) != -ENOKEY) {
- _leave(" = %ld", PTR_ERR(key));
+ _leave(" = %pe", key);
return key;
}
@@ -91,7 +91,7 @@ struct key *afs_request_key_rcu(struct afs_cell *cell)
cell->net->net);
if (IS_ERR(key)) {
if (PTR_ERR(key) != -ENOKEY) {
- _leave(" = %ld", PTR_ERR(key));
+ _leave(" = %pe", key);
return key;
}
@@ -451,7 +451,7 @@ int afs_permission(struct mnt_idmap *idmap, struct inode *inode,
} else {
key = afs_request_key(vnode->volume->cell);
if (IS_ERR(key)) {
- _leave(" = %ld [key]", PTR_ERR(key));
+ _leave(" = %pe [key]", key);
return PTR_ERR(key);
}
--
2.47.3
reply other threads:[~2026-06-08 16:16 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=20260608161648.14954-1-mahad.ibrahim.dev@gmail.com \
--to=mahad.ibrahim.dev@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
/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