btrfs: Assign boolean values to a bool variable
PATCH 1/1 btrfs: Assign boolean values to a bool variable
Fix the following coccicheck warnings:
./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function 'dev_extent_hole_check_zoned' with return type bool.
--- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/volumes.c +2 -2
@@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,/* Given hole range was invalid (outside of device) */ if (ret == -ERANGE ) { *hole_start += *hole_size; - *hole_size =0 ; -return 1 ; + *hole_size = false; +return true; } *hole_start += zone_size;
Signature · 1 line
1.8.3.1
Quoted 7 lines · Jiapeng Chong
Fix the following coccicheck warnings:
./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function '
dev_extent_hole_check_zoned' with return type bool.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>
Added to misc-next, thanks.
Quoted 16 lines · Jiapeng Chong
Fix the following coccicheck warnings:
./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function '
dev_extent_hole_check_zoned' with return type bool.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/volumes.c +0
-0
fs/btrfs/volumes.c static bool dev_extent_hole_check_zoned(struct btrfs_device *device, · line 1461
Quoted 6 lines
fs/btrfs/volumes.c +1
-2@@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,/* Given hole range was invalid (outside of device) */ if (ret == -ERANGE ) { *hole_start += *hole_size; - *hole_size =0 ; -return 1 ; + *hole_size = false;
Erm, hole_size is u64 and not bool
Quoted 12 lines · Johannes Thumshirn
Quoted 11 lines · Jiapeng Chong
Fix the following coccicheck warnings:
./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function '
dev_extent_hole_check_zoned' with return type bool.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 14 lines
fs/btrfs/volumes.c static bool dev_extent_hole_check_zoned(struct btrfs_device *device, · line 1461
Quoted 11 lines
fs/btrfs/volumes.c +1
-2@@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,/* Given hole range was invalid (outside of device) */ if (ret == -ERANGE ) { *hole_start += *hole_size; - *hole_size =0 ; -return 1 ; + *hole_size = false;Erm,
hole_sizeis u64 and not bool
Thanks for catching it, I should have spotted that.