mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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>
This commit is contained in:
parent
d99748ef16
commit
3fb803cdfb
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user