]> www.infradead.org Git - users/hch/misc.git/commit
md: improve return types of badblocks handling functions
authorZheng Qixing <zhengqixing@huawei.com>
Thu, 27 Feb 2025 07:55:06 +0000 (15:55 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Mar 2025 15:03:28 +0000 (08:03 -0700)
commit7e5102dd99f3ad1f981671ad5b4f24ac48c568ad
treedb6652b05a3e235d1c0e5e6c7d383c5eb0c4d757
parentc8775aefba959cdfbaa25408a84d3dd15bbeb991
md: improve return types of badblocks handling functions

rdev_set_badblocks() only indicates success/failure, so convert its return
type from int to boolean for better semantic clarity.

rdev_clear_badblocks() return value is never used by any caller, convert it
to void. This removes unnecessary value returns.

Also update narrow_write_error() in both raid1 and raid10 to use boolean
return type to match rdev_set_badblocks().

Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20250227075507.151331-12-zhengqixing@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c
drivers/md/md.h
drivers/md/raid1.c
drivers/md/raid10.c