summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdellah Ouhbi <abdououhbi1@gmail.com>2026-04-24 16:43:07 +0100
committerTheodore Ts'o <tytso@mit.edu>2026-06-01 08:25:38 -0400
commit3fb803cdfbb1a2c31a77b1c0e6b6e2022f29af97 (patch)
tree12ab778747f2f7c8fed09121a88c939a3a80f08f
parentd99748ef1695ce17eaf51c64b7a06952fa7cddab (diff)
downloadlinux-3fb803cdfbb1a2c31a77b1c0e6b6e2022f29af97.tar.gz
linux-3fb803cdfbb1a2c31a77b1c0e6b6e2022f29af97.zip
ext4: Use %pe to print PTR_ERR()
Replace %ld with %pe and PTR_ERR(path) with path pointer. The %pe specifier automatically converts error pointers to human-readable error names instead of raw error codes. These changes were found by coccicheck. Signed-off-by: Abdellah Ouhbi <abdououhbi1@gmail.com> Link: https://patch.msgid.link/20260424154307.169881-1-abdououhbi1@gmail.com Link: https://patch.msgid.link/20260424155508.186235-1-abdououhbi1@gmail.com Link: https://patch.msgid.link/20260424152245.142308-1-abdououhbi1@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/extents.c4
-rw-r--r--fs/ext4/namei.c4
-rw-r--r--fs/ext4/super.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 125f628e738a..91c97af64b31 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3268,8 +3268,8 @@ static struct ext4_ext_path *ext4_split_extent_at(handle_t *handle,
*/
path = ext4_find_extent(inode, ee_block, NULL, flags | EXT4_EX_NOFAIL);
if (IS_ERR(path)) {
- EXT4_ERROR_INODE(inode, "Failed split extent on %u, err %ld",
- split, PTR_ERR(path));
+ EXT4_ERROR_INODE(inode, "Failed split extent on %u, err %pe",
+ split, path);
goto out_path;
}
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 4a47fbd8dd30..c0cabf172020 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -145,9 +145,9 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
if (IS_ERR(bh)) {
__ext4_warning(inode->i_sb, func, line,
"inode #%llu: lblock %lu: comm %s: "
- "error %ld reading directory block",
+ "error %pe reading directory block",
inode->i_ino, (unsigned long)block,
- current->comm, PTR_ERR(bh));
+ current->comm, bh);
return bh;
}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6a77db4d3124..4b69e0879731 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5977,8 +5977,8 @@ static struct file *ext4_get_journal_blkdev(struct super_block *sb,
sb, &fs_holder_ops);
if (IS_ERR(bdev_file)) {
ext4_msg(sb, KERN_ERR,
- "failed to open journal device unknown-block(%u,%u) %ld",
- MAJOR(j_dev), MINOR(j_dev), PTR_ERR(bdev_file));
+ "failed to open journal device unknown-block(%u,%u) %pe",
+ MAJOR(j_dev), MINOR(j_dev), bdev_file);
return bdev_file;
}