[PATCH] afs: use %pe to print error pointers in security.c
Mahad Ibrahim <[email protected]> Mon, 8 Jun 2026 21:16:48 +0500
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- 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