]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
f2fs: use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 2 Aug 2018 00:51:38 +0000 (19:51 -0500)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Aug 2018 23:19:05 +0000 (16:19 -0700)
Return statements in functions returning bool should use true or false
instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h

index a9447c7d6570002da226d739fff2abe0dd648b75..75e81b1af2e848a016209fe319f1e439c86f5508 100644 (file)
@@ -1334,7 +1334,7 @@ static inline bool is_idle(struct f2fs_sb_info *sbi)
        struct request_list *rl = &q->root_rl;
 
        if (rl->count[BLK_RW_SYNC] || rl->count[BLK_RW_ASYNC])
-               return 0;
+               return false;
 
        return f2fs_time_over(sbi, REQ_TIME);
 }
@@ -3400,7 +3400,7 @@ static inline bool f2fs_may_encrypt(struct inode *inode)
 
        return (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode));
 #else
-       return 0;
+       return false;
 #endif
 }