From: Simon Glass <simon.glass@canonical.com> verity.c: - Use EXT4_LBLK_TO_B() macro instead of inline shift symlink.c: - Change ext4_free_link() parameter from const void* to void* to match Linux kernel signature and remove unnecessary cast hash.c: - Return -EINVAL instead of -1 for error consistency Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/hash.c | 2 +- fs/ext4l/verity.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/hash.c b/fs/ext4l/hash.c index 1ce0c2bcc84..58063a872d3 100644 --- a/fs/ext4l/hash.c +++ b/fs/ext4l/hash.c @@ -267,7 +267,7 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len, combined_hash = fscrypt_fname_siphash(dir, &qname); } else { ext4_warning_inode(dir, "Siphash requires key"); - return -1; + return -EINVAL; } hash = (__u32)(combined_hash >> 32); diff --git a/fs/ext4l/verity.c b/fs/ext4l/verity.c index b0acb0c5031..415d9c4d8a3 100644 --- a/fs/ext4l/verity.c +++ b/fs/ext4l/verity.c @@ -302,7 +302,7 @@ static int ext4_get_verity_descriptor_location(struct inode *inode, end_lblk = le32_to_cpu(last_extent->ee_block) + ext4_ext_get_actual_len(last_extent); - desc_size_pos = (u64)end_lblk << inode->i_blkbits; + desc_size_pos = EXT4_LBLK_TO_B(inode, end_lblk); ext4_free_ext_path(path); if (desc_size_pos < sizeof(desc_size_disk)) -- 2.43.0