Commit f1e46758 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

bcache: work around a __bitwise to bool conversion sparse warning

Sparse is a bit dumb about bitwise operation on __bitwise types used
in boolean contexts.  Add a !! to explicitly propagate to boolean
without a warning.

Fixes: fcf865e3 ("block: convert features and flags to __bitwise types")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
Link: https://lore.kernel.org/r/20240628131657.667797-1-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 18048c1a
......@@ -1416,8 +1416,8 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size)
}
if (bdev_io_opt(dc->bdev))
dc->partial_stripes_expensive = q->limits.features &
BLK_FEAT_RAID_PARTIAL_STRIPES_EXPENSIVE;
dc->partial_stripes_expensive = !!(q->limits.features &
BLK_FEAT_RAID_PARTIAL_STRIPES_EXPENSIVE);
ret = bcache_device_init(&dc->disk, block_size,
bdev_nr_sectors(dc->bdev) - dc->sb.data_offset,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment