From 36af5f407bbb2da6dd9809dd6f173dd377b57d74 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Tue, 28 May 2019 17:23:33 +0800 Subject: f2fs: fix sparse warning make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__" CHECK dir.c dir.c:842:50: warning: cast from restricted __le32 CHECK node.c node.c:2759:40: warning: restricted __le32 degrades to integer Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/f2fs/dir.c') diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 59bc46017855..64cb61c42b95 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -828,8 +828,8 @@ int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, int save_len = fstr->len; err = fscrypt_fname_disk_to_usr(d->inode, - (u32)de->hash_code, 0, - &de_name, fstr); + (u32)le32_to_cpu(de->hash_code), + 0, &de_name, fstr); if (err) goto out; -- cgit v1.2.3