Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2389346imw; Wed, 6 Jul 2022 05:15:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u8kbKARMuF3utWlYVKWML0ImfddHGxwZBcTkV3u8bwdm19S9VxFm8ukEOmC8VCC/Sfxpok X-Received: by 2002:a17:907:9005:b0:715:76ce:4476 with SMTP id ay5-20020a170907900500b0071576ce4476mr38455445ejc.560.1657109716652; Wed, 06 Jul 2022 05:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657109716; cv=none; d=google.com; s=arc-20160816; b=GF1VVY2N1pNzA5K7rjjgHTxs/gdQOF/p3I+p3DYNc9e0Uc3ctPJrOPTLK5ljMdedas rHm8eaoHSde8yKkhzCV09/V4JQg1/kxgrtxvb1uNPRGHd6axagjEqUDOxx5VZuPIxOBx T//ugBStqGhpdvVdFLKnbEb+pLxGPzjA/Ke3FRv/IhKsSFDARUXdjdPydnhDrsKlpWYB N7NNowneRbcoMmiuMz6tuLuyuawg/5Ld59dHNx2tTJK9gWhQxNpmWpYDiDOc4SWO4YtG W/cycOAuOz62LdZ66jYFyLMvR6srhnUcFmaDoAVNj0am0TdAB5Fuo6HvVAZny1Tx3D64 VwQA== 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=HhVP5IjSRhzCJkOXa3Vw/m8Cv87JXzCbGNKCBKQJ38U=; b=0QXub1PJUX353mzABkTgiANIqLfH6Qc+j398yu9lL4Kmx1FwVlMn4rj2++ifx3/s6N qELcztTUk0HbiInSPLYu8LGxXdprOfhEQU6cP1nXWbpQ1NUZA++gnRop4EZHaGmaSEf3 yF3rywbDEkVR340OBTSMrxlcVe4STukTRqanTLzZpWdT1vfOIUCCq+wUwXV3TBvxz5Lj bCFHcSiJsUJogLNz2A0wVd1JsyVJ/kF7/t+c2+UfZLJonNDUKgnov1H+vRPPgKIhsHHI hlH3IHHcuKsZBot21LXUtAGYToi6/8+sr+OsIb8jBrC3Jn2tCyDaqvx0hg8qP1tU4msh QP6Q== 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 h20-20020a170906111400b0072ab8afaaacsi12138098eja.696.2022.07.06.05.14.51; Wed, 06 Jul 2022 05:15:16 -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 S233618AbiGFMMB (ORCPT + 99 others); Wed, 6 Jul 2022 08:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233610AbiGFMLj (ORCPT ); Wed, 6 Jul 2022 08:11:39 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C8152A424; Wed, 6 Jul 2022 05:11:30 -0700 (PDT) Received: from fraeml735-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LdJFH458gz686xt; Wed, 6 Jul 2022 20:07:15 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml735-chm.china.huawei.com (10.206.15.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Jul 2022 14:11:28 +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; Wed, 6 Jul 2022 13:11:22 +0100 From: John Garry To: , , , , , , , , , CC: , , , , , , , , , , John Garry Subject: [PATCH v3 6/6] blk-mq: Drop local variable for reserved tag Date: Wed, 6 Jul 2022 20:03:54 +0800 Message-ID: <1657109034-206040-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1657109034-206040-1-git-send-email-john.garry@huawei.com> References: <1657109034-206040-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 Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- 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 4e9b8ec55bda..8e3b36d1cb57 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -262,7 +262,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; @@ -272,7 +271,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 @@ -333,12 +332,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.35.3