Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4591829pxu; Wed, 9 Dec 2020 23:51:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3Qbl2Cwl6s7BUrUghPZRHS0Q9SHOtfM8kTx0ytIFI8nr1RbPyC4ordGsNrbqTF7xXBdom X-Received: by 2002:a17:906:e18:: with SMTP id l24mr5091580eji.434.1607586683582; Wed, 09 Dec 2020 23:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607586683; cv=none; d=google.com; s=arc-20160816; b=xia79P2ply/pG15XH/KOHcHkeaAR15YKLRZuLC/62aLcufRU+xw7FP6NJPAdYmWrfO iMoSFEOneoE8NJEe/5eCNs2LjRKcTPFWw4KLo3x3rxQ+4428wjjRUKqD3SQtF3JCTTii FyqYiYpTMqt7HCDu160qsmITlkNMAAgQmWdVzop7302W4Cn8JDqAL0AJgxtOjfEVrfkj F9b7kuaeDzhzaolB1HrZST38+jy2LolMzkVAtb5NrjMp0oe2n+bSqFXaV2u7xBd+tkiA gMVnyrUVml0OvLsnmCbq529Ybn8ouZgp1ffyr0jOM2oUAEUTQCDGbYO69XuyRyMZ4EMb lWaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=q0MPaXbL3vcYZK5UoMaGBOhHuJlApCzZaYHQeLt2jOE=; b=zVsfN19DVQCvRfUE5TOpCRa2QiZRRARULGo2Pa/Ecpld8kVNee7GJLhsbCpqT+MZAk gb6LWOBfUgdYTWxvIr3l/eD4jcuXDH/Kp5bxFlCDtjd78dIxysiXiyxpBT2MxnnjB/W0 H32umWMl+2BV7AWwUPrQTzzw1rNzq6d3VYvUyV0jqebCBVv0AiY2EwchGDDAAzwp0oae L9xG21+VNZ8gzTEVmyT1RcXt3hwfzVZCVC/nAG3jHaUjCnjE6RhPJAiXFu7CdYdeQpGH ujlgxyWy54flkH5j4lKt6+E9vUqvCWGY47BlUQcqk8PP8/uPpMqVpYJ33yM11ubrHEm9 b4qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si2118842edb.338.2020.12.09.23.51.00; Wed, 09 Dec 2020 23:51:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbgLJHtG (ORCPT + 99 others); Thu, 10 Dec 2020 02:49:06 -0500 Received: from smtp.h3c.com ([60.191.123.56]:21835 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbgLJHtG (ORCPT ); Thu, 10 Dec 2020 02:49:06 -0500 Received: from h3cspam01-ex.h3c.com (localhost [127.0.0.2] (may be forged)) by h3cspam01-ex.h3c.com with ESMTP id 0BA6Fbjb026975; Thu, 10 Dec 2020 14:15:37 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam01-ex.h3c.com with ESMTP id 0BA6F9KN025956; Thu, 10 Dec 2020 14:15:10 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from localhost.localdomain (10.99.212.201) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 10 Dec 2020 14:15:12 +0800 From: Xianting Tian To: CC: , , , Xianting Tian Subject: [PATCH] [v3] blk-mq-tag: make blk_mq_tag_busy() return void Date: Thu, 10 Dec 2020 14:04:48 +0800 Message-ID: <20201210060448.23435-1-tian.xianting@h3c.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.99.212.201] X-ClientProxiedBy: BJSMTP02-EX.srv.huawei-3com.com (10.63.20.133) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 0BA6F9KN025956 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As no one cares about the return value of blk_mq_tag_busy() and __blk_mq_tag_busy(), so make them return void. Other change is to simplify blk_mq_tag_idle(). Signed-off-by: Xianting Tian Reviewed-by: Ming Lei --- block/blk-mq-tag.c | 4 +--- block/blk-mq-tag.h | 16 ++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 9c92053e7..01c0bb1fb 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -21,7 +21,7 @@ * to get tag when first time, the other shared-tag users could reserve * budget for it. */ -bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) +void __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) { if (blk_mq_is_sbitmap_shared(hctx->flags)) { struct request_queue *q = hctx->queue; @@ -35,8 +35,6 @@ bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state)) atomic_inc(&hctx->tags->active_queues); } - - return true; } /* diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h index 7d3e6b333..4b4ccd794 100644 --- a/block/blk-mq-tag.h +++ b/block/blk-mq-tag.h @@ -60,23 +60,19 @@ enum { BLK_MQ_TAG_MAX = BLK_MQ_NO_TAG - 1, }; -extern bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *); +extern void __blk_mq_tag_busy(struct blk_mq_hw_ctx *); extern void __blk_mq_tag_idle(struct blk_mq_hw_ctx *); -static inline bool blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) +static inline void blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) { - if (!(hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED)) - return false; - - return __blk_mq_tag_busy(hctx); + if (hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED) + __blk_mq_tag_busy(hctx); } static inline void blk_mq_tag_idle(struct blk_mq_hw_ctx *hctx) { - if (!(hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED)) - return; - - __blk_mq_tag_idle(hctx); + if (hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED) + __blk_mq_tag_idle(hctx); } static inline bool blk_mq_tag_is_reserved(struct blk_mq_tags *tags, -- 2.17.1