summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-03-24 12:04:20 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-10 15:08:55 -0700
commitadad81ed42bbc537f37192dcdd9a83e34bb61987 (patch)
treeffd2aa2a4ecec4bcac8292788dc4bd6c53b94a4c /fs/f2fs
parent1b3e27a92ab60452b8fbb35e3ba691ac34f2c0fb (diff)
f2fs: fix sparse warnings
This patch fixes the below warning. sparse warnings: (new ones prefixed by >>) >> fs/f2fs/inode.c:56:23: sparse: restricted __le32 degrades to integer >> fs/f2fs/inode.c:56:52: sparse: restricted __le32 degrades to integer Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 07237ac2935e..e622ec95409e 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -53,7 +53,9 @@ static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri)
static bool __written_first_block(struct f2fs_inode *ri)
{
- if (ri->i_addr[0] != NEW_ADDR && ri->i_addr[0] != NULL_ADDR)
+ block_t addr = le32_to_cpu(ri->i_addr[0]);
+
+ if (addr != NEW_ADDR && addr != NULL_ADDR)
return true;
return false;
}