Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4580634pxu; Wed, 9 Dec 2020 23:26:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyYM2HU61qSIZRz188E6p/H4XJNgMxKRQF7/08RsPD9qlo+MjYFomHh4kBC1kTZDgI5O/k X-Received: by 2002:aa7:c388:: with SMTP id k8mr5411981edq.36.1607585165020; Wed, 09 Dec 2020 23:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607585165; cv=none; d=google.com; s=arc-20160816; b=K8tyLSlG4lR3umeS749CA7UZ7H8Y1LPHxDXEvLXeuXfGGAx8I04ZfUnt156g/n+/g7 ViIXuy3VhwDX/tdkSF84SYSmJWz2bYCBaBAdwGB5aS+lMWrD0VCy0mHtStGuvCYirWIc h2a/h45PGuB+PGJbOwRr/RaFyp1f6z3L/KoZ4t8LbsCko+0PN+cYhBhLOLbUUGoKg480 G2Yi31B+6NlSO+M1iYnJlIOzJbCyc/HAKpIbmqq0JLXJcAIfHs761d8vlXfZLvf6zGLM LwjYsdlaPcDWBGFbGvxBflnSFBD7UeRtDp3gO9fCUf/mAij0cfgt/2Ntw3/a2R5ApvDC wwcg== 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=jo9uNfNLcu8/q2qP2okQM2vXxKNte74nnLrCM4Y2FaQ=; b=0TOMX7/tb97/d9CPNH/B31CAT4j7mGJJLHksy9tMrcCrDX28TnFJM7eGscv0oz865P tD/VFC/Ady3nXc5sSErqFDZre+/WzsqSES4Rqiz/eVSnksULzuBi5Md9TkmlLqnmqeRn 3LZfGfqsM24NU71EDIjsTrKHUUmPbAoprfw/uEzFk9qsIx5hKCARZ3Af/1MkNlsqzhPh 2PJvl8xP5NLYd6h91LS3yjJvItzwE8p6p5CvwNWfR31nVi+8KbGv35qoBdSlc36n6BEw i7ipTh7TQkuIq51R+Ask6jZ2C8zp5YWMsgXRC1afwWd8axeQ834qPZIISfIolDoPEC9N n3RQ== 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 gs31si2088753ejc.337.2020.12.09.23.25.41; Wed, 09 Dec 2020 23:26:05 -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 S1733038AbgLJGFQ (ORCPT + 99 others); Thu, 10 Dec 2020 01:05:16 -0500 Received: from smtp.h3c.com ([60.191.123.50]:26874 "EHLO h3cspam02-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732896AbgLJGFQ (ORCPT ); Thu, 10 Dec 2020 01:05:16 -0500 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam02-ex.h3c.com with ESMTP id 0BA63XK7009246; Thu, 10 Dec 2020 14:03:33 +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:03:35 +0800 From: Xianting Tian To: CC: , , , Xianting Tian Subject: [PATCH] [v2] blk-mq-tag: make blk_mq_tag_busy() return void Date: Thu, 10 Dec 2020 13:53:07 +0800 Message-ID: <20201210055307.1024-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: BJSMTP01-EX.srv.huawei-3com.com (10.63.20.132) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam02-ex.h3c.com 0BA63XK7009246 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, 8 insertions(+), 12 deletions(-) diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 9c92053e7..21ff7d156 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; @@ -36,7 +36,7 @@ bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) atomic_inc(&hctx->tags->active_queues); } - return true; + return; } /* 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