From 75e6c00fc75c53577bfc4831d909162c56e799ce Mon Sep 17 00:00:00 2001 From: Yufen Yu Date: Thu, 8 Oct 2020 23:26:29 -0400 Subject: block: use helper function to test queue register We have defined common interface blk_queue_registered() to test QUEUE_FLAG_REGISTERED. Just use it. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe --- block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/blk-iocost.c') diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 951ad4bb27f5..bbe86d1199dc 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -669,7 +669,7 @@ static struct ioc *q_to_ioc(struct request_queue *q) static const char *q_name(struct request_queue *q) { - if (test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags)) + if (blk_queue_registered(q)) return kobject_name(q->kobj.parent); else return ""; -- cgit v1.2.3