* [PATCH] afs: use %pe to print error pointers in security.c
@ 2026-06-08 16:16 Mahad Ibrahim
0 siblings, 0 replies; only message in thread
From: Mahad Ibrahim @ 2026-06-08 16:16 UTC (permalink / raw)
To: David Howells, Marc Dionne
Cc: linux-afs, linux-kernel, linux-kernel-mentees, Mahad Ibrahim
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-08 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 16:16 [PATCH] afs: use %pe to print error pointers in security.c Mahad Ibrahim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox