Skip to content

Commit

Permalink
f2fs: Simplify bool conversion
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:
./fs/f2fs/sysfs.c:491:41-46: WARNING: conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Yang Li authored and Jaegeuk Kim committed Jan 4, 2022
1 parent 2a64e30 commit d361b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,

if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) {
spin_lock(&sbi->gc_urgent_high_lock);
sbi->gc_urgent_high_limited = t == 0 ? false : true;
sbi->gc_urgent_high_limited = t != 0;
sbi->gc_urgent_high_remaining = t;
spin_unlock(&sbi->gc_urgent_high_lock);

Expand Down

0 comments on commit d361b69

Please sign in to comment.