On Mon, Feb 27, 2023 at 08:44:33PM +0800, Zhang Zhen wrote: > The only caller of bch_cached_dev_error does not check the return > value. We can make it a void function. > > Signed-off-by: Zhen Zhang <zhangzhen15@xxxxxxxxxxxx> NACK. I prefer to have the return values for different conditions, even they are not used for now. Coly Li > --- > drivers/md/bcache/bcache.h | 2 +- > drivers/md/bcache/super.c | 5 ++--- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h > index aebb7ef10e63..ff175a2fb2f0 100644 > --- a/drivers/md/bcache/bcache.h > +++ b/drivers/md/bcache/bcache.h > @@ -990,7 +990,7 @@ int bch_bucket_alloc_set(struct cache_set *c, unsigned > int reserve, > bool bch_alloc_sectors(struct cache_set *c, struct bkey *k, > unsigned int sectors, unsigned int write_point, > unsigned int write_prio, bool wait); > -bool bch_cached_dev_error(struct cached_dev *dc); > +void bch_cached_dev_error(struct cached_dev *dc); > __printf(2, 3) > bool bch_cache_set_error(struct cache_set *c, const char *fmt, ...); > diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c > index ba3909bb6bea..9923bb5c4fbe 100644 > --- a/drivers/md/bcache/super.c > +++ b/drivers/md/bcache/super.c > @@ -1607,10 +1607,10 @@ int bch_flash_dev_create(struct cache_set *c, > uint64_t size) > return flash_dev_run(c, u); > } > -bool bch_cached_dev_error(struct cached_dev *dc) > +void bch_cached_dev_error(struct cached_dev *dc) > { > if (!dc || test_bit(BCACHE_DEV_CLOSING, &dc->disk.flags)) > - return false; > + return; > dc->io_disable = true; > /* make others know io_disable is true earlier */ > @@ -1620,7 +1620,6 @@ bool bch_cached_dev_error(struct cached_dev *dc) > dc->disk.disk->disk_name, dc->bdev); > bcache_device_stop(&dc->disk); > - return true; > } > /* Cache set */ > -- > 2.27.0 > -- Coly Li