From: Jiapeng Chong Date: Wed, 3 Mar 2021 09:45:28 +0000 (+0800) Subject: btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned X-Git-Tag: v5.15~953^2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7000babddac651d6038200ee847d50a7f930a2cc;p=platform%2Fkernel%2Flinux-starfive.git btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned 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 Signed-off-by: Jiapeng Chong Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 1c6810bbaf8b..d4ca721c1d91 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -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;