]> www.infradead.org Git - users/hch/misc.git/commit
badblocks: return boolean from badblocks_set() and badblocks_clear()
authorZheng Qixing <zhengqixing@huawei.com>
Thu, 27 Feb 2025 07:55:05 +0000 (15:55 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Mar 2025 15:03:28 +0000 (08:03 -0700)
commitc8775aefba959cdfbaa25408a84d3dd15bbeb991
tree4dd0a3bb535d85f6c5666e0c064e62f7644ce337
parent5236f041fa6c81c71eabad44897e54a0d6d5bbf6
badblocks: return boolean from badblocks_set() and badblocks_clear()

Change the return type of badblocks_set() and badblocks_clear()
from int to bool, indicating success or failure. Specifically:

- _badblocks_set() and _badblocks_clear() functions now return
true for success and false for failure.
- All calls to these functions are updated to handle the new
boolean return type.
- This change improves code clarity and ensures a more consistent
handling of success and failure states.

Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Coly Li <colyli@kernel.org>
Acked-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20250227075507.151331-11-zhengqixing@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/badblocks.c
drivers/block/null_blk/main.c
drivers/md/md.c
drivers/nvdimm/badrange.c
include/linux/badblocks.h