[PATCH v4 2/6] blk-wbt: remove unnecessary check in wbt_enable_default()

Yu Kuai posted 6 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH v4 2/6] blk-wbt: remove unnecessary check in wbt_enable_default()
Posted by Yu Kuai 3 years, 6 months ago
From: Yu Kuai <yukuai3@huawei.com>

If CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 block/blk-wbt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 246467926253..4ed60dbd0756 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -651,7 +651,7 @@ void wbt_enable_default(struct request_queue *q)
 	if (!blk_queue_registered(q))
 		return;
 
-	if (queue_is_mq(q) && IS_ENABLED(CONFIG_BLK_WBT_MQ))
+	if (queue_is_mq(q))
 		wbt_init(q);
 }
 EXPORT_SYMBOL_GPL(wbt_enable_default);
-- 
2.31.1
Re: [PATCH v4 2/6] blk-wbt: remove unnecessary check in wbt_enable_default()
Posted by Christoph Hellwig 3 years, 5 months ago
On Fri, Sep 30, 2022 at 11:19:02AM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
> 
> If CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.
> 
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>