afs: use %pe to print error pointers in security.c
PATCH 1/1 afs: use %pe to print error pointers in security.c
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(-)
fs/afs/security.c +3 -3
@@ -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); }
Signature · 1 line
2.47.3