Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3731821iog; Tue, 21 Jun 2022 05:00:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uguwPewbAUhIOYLFUWLRBD3Z6RE1s4EgFDzWAZdnvUNOvklEq8Aj6k49oTt4uPO9Iipz4s X-Received: by 2002:a17:90b:4f4e:b0:1ec:a71c:4148 with SMTP id pj14-20020a17090b4f4e00b001eca71c4148mr11471751pjb.124.1655812818761; Tue, 21 Jun 2022 05:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655812818; cv=none; d=google.com; s=arc-20160816; b=DkE+dBlUOWS0UTzpmHsrSCrFuEUu8yZqvWsAo3TWmy+gwjRaqPWcBI3jOI+4MyE+xF BuNPGngiqDB948GI7ZQ6Y79eNS8CSqGuG6AKtY8QUoIVGU8IFHBptLzYkhLIFi60JBNP sXUiYPE9gUMZFMuShN6SIz+L3nzMgblN7qpPedh7VswvNqbdWGAXTlyxn53HkJplCcL1 E3ToGTwB96gfK+mNKAsfp/BJy6QZ7zNYm3eIv2cv9jiolBZilf37TKPFfo3XrmrlHTA6 Cq429leAKdEmiM4Z7wnxp0AOWJulTccRoELNk2x9K4nAfwWsilzl/fJ95ty83k3xPoRX Ujag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=SbaUww0+uCbucAspLl2X9s3lwDDZOs3w6iMH7m7wD+Y=; b=r3du0o/FtAiyLFTh95gWuPjIC2VBG6gKGkMMffGTOXgxz2TNQaiYTrYQGLEh0jKq29 CQGOs6gmo0ldK493EEb/DtAIMCUrMGZa9IVE838LkSHI69n6IEiG3u2TkV96doYVB2B1 YeGhFDhnUe4IGqQuv+m6FywWpFmKSszCWCeyTJzV2tC+mftOjUOfvxxOsU8hUSIJt4OR d0vRRnzu9AyToGSqsGVo33dPJ1rAbslAoikDoMHDTiDN0Hdkr2sd3WGF8DkRC0U0vwcX Tq6lMt8r540m5WDhRt5/RTIphGlDZ73ue3DZYE7vypwujOSDd6qFIJqgUAhSKtEMGwE0 i3vA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a17090311c300b00163f8c2deabsi26605524plh.257.2022.06.21.05.00.02; Tue, 21 Jun 2022 05:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349541AbiFULXA (ORCPT + 99 others); Tue, 21 Jun 2022 07:23:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349242AbiFULWj (ORCPT ); Tue, 21 Jun 2022 07:22:39 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BE8C2A435; Tue, 21 Jun 2022 04:22:35 -0700 (PDT) Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LS3wQ0Twwz6H6r5; Tue, 21 Jun 2022 19:20:38 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 21 Jun 2022 13:22:33 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 21 Jun 2022 12:22:27 +0100 From: John Garry To: , , , , , , , , , CC: , , , , , , , , , , John Garry Subject: [PATCH v2 6/6] blk-mq: Drop local variable for reserved tag Date: Tue, 21 Jun 2022 19:15:43 +0800 Message-ID: <1655810143-67784-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1655810143-67784-1-git-send-email-john.garry@huawei.com> References: <1655810143-67784-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The local variable is now only referenced once so drop it. Signed-off-by: John Garry --- block/blk-mq-tag.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 509c35f080a9..b8cc8b41553f 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -266,7 +266,6 @@ static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) struct blk_mq_hw_ctx *hctx = iter_data->hctx; struct request_queue *q = iter_data->q; struct blk_mq_tag_set *set = q->tag_set; - bool reserved = iter_data->reserved; struct blk_mq_tags *tags; struct request *rq; bool ret = true; @@ -276,7 +275,7 @@ static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) else tags = hctx->tags; - if (!reserved) + if (!iter_data->reserved) bitnr += tags->nr_reserved_tags; /* * We can hit rq == NULL here, because the tagging functions @@ -337,12 +336,11 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) { struct bt_tags_iter_data *iter_data = data; struct blk_mq_tags *tags = iter_data->tags; - bool reserved = iter_data->flags & BT_TAG_ITER_RESERVED; struct request *rq; bool ret = true; bool iter_static_rqs = !!(iter_data->flags & BT_TAG_ITER_STATIC_RQS); - if (!reserved) + if (!(iter_data->flags & BT_TAG_ITER_RESERVED)) bitnr += tags->nr_reserved_tags; /* -- 2.25.1