Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1331516pxb; Fri, 24 Sep 2021 02:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyil4OrNd8s9fssWa8ym7hD6ZF80gLaVEoaJqsr6QnciyNB+uBwlOLJivrQMLruF/8D4wuQ X-Received: by 2002:a92:cb43:: with SMTP id f3mr7656597ilq.261.1632474116413; Fri, 24 Sep 2021 02:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632474116; cv=none; d=google.com; s=arc-20160816; b=Yn2A7dVp2imcbMqS0v85con8cTUEueH2f78/e1kfg+0bTp7t/zYqhWt3rIH16oPvYN F+yyLRip1yVD5YS8UPWpLUkQiRBEO+JJZ3/IDdJtDwgemc+ENciNEysO7D+ZZnjOnO/+ cEvBfirg1cbabrInvN8d4bQkKr8MjiB2Jb4j1Wpzn1U+zAVnVoUsVQdDKoE01BQ85Iwa mab3vW1BBtIWSHWWXQnhabXMcCDQtC50G0XJ+zGUJiKwkfeBTi1QEI2fiXh+n+40IU6f HTtX754bpUyMFhWixpIux2Ci8bOy3vh4csXGWRsmKTwiV8G1Dp3Aovf3xLyo2qW6DDPd By9g== 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=EVdX25wsPx5xOzVLD3UOC2BqgKst0FDdr2duinssSaw=; b=WRRQxKUOshUfqkleQSQK8K06ibdFv+eqUXCJe3LhbEEN6ny1BB3bk3V6+dbh7vIf1Z tLqtsJNV3zW+gP2qiBy06XrXnT8sOIPWY91EhOa/N1epditsP/00wBsQ3D8vqxSG/CV7 H/1qbKZ6GcZHL/+JDlUnE0LAESYv/TWs/jqQGZfHwuajty5HTWSjDFj4/rL2a+3sSslw wWpmUYrKyhxt15pvoudyKV8JAjzEEF7wchrDkc6/i3n8KWKw2qB7dYRFgfl9ov7YnenM J06cOw6LhGIik9JA8DNuQsxLvPdouXpBLxOFic61tAHXA2PtI+kg5lddcrSRBntULe+3 iksQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si9505770ilm.108.2021.09.24.02.01.37; Fri, 24 Sep 2021 02:01:56 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244789AbhIXIfV (ORCPT + 99 others); Fri, 24 Sep 2021 04:35:21 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3859 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244814AbhIXIfQ (ORCPT ); Fri, 24 Sep 2021 04:35:16 -0400 Received: from fraeml714-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HG4xP255Fz67Xk3; Fri, 24 Sep 2021 16:31:05 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml714-chm.china.huawei.com (10.206.15.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 24 Sep 2021 10:33:41 +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.2308.8; Fri, 24 Sep 2021 09:33:39 +0100 From: John Garry To: CC: , , , , , "John Garry" Subject: [PATCH v4 05/13] blk-mq-sched: Rename blk_mq_sched_alloc_{tags -> map_and_rqs}() Date: Fri, 24 Sep 2021 16:28:22 +0800 Message-ID: <1632472110-244938-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1632472110-244938-1-git-send-email-john.garry@huawei.com> References: <1632472110-244938-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: dggems705-chm.china.huawei.com (10.3.19.182) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function blk_mq_sched_alloc_tags() does same as __blk_mq_alloc_map_and_request(), so give a similar name to be consistent. Similarly rename label err_free_tags -> err_free_map_and_rqs. Signed-off-by: John Garry Reviewed-by: Ming Lei --- block/blk-mq-sched.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 2231fb0d4c35..644b6d554d72 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -515,9 +515,9 @@ void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx, percpu_ref_put(&q->q_usage_counter); } -static int blk_mq_sched_alloc_tags(struct request_queue *q, - struct blk_mq_hw_ctx *hctx, - unsigned int hctx_idx) +static int blk_mq_sched_alloc_map_and_rqs(struct request_queue *q, + struct blk_mq_hw_ctx *hctx, + unsigned int hctx_idx) { struct blk_mq_tag_set *set = q->tag_set; int ret; @@ -609,15 +609,15 @@ int blk_mq_init_sched(struct request_queue *q, struct elevator_type *e) BLKDEV_DEFAULT_RQ); queue_for_each_hw_ctx(q, hctx, i) { - ret = blk_mq_sched_alloc_tags(q, hctx, i); + ret = blk_mq_sched_alloc_map_and_rqs(q, hctx, i); if (ret) - goto err_free_tags; + goto err_free_map_and_rqs; } if (blk_mq_is_sbitmap_shared(q->tag_set->flags)) { ret = blk_mq_init_sched_shared_sbitmap(q); if (ret) - goto err_free_tags; + goto err_free_map_and_rqs; } ret = e->ops.init_sched(q, e); @@ -645,7 +645,7 @@ int blk_mq_init_sched(struct request_queue *q, struct elevator_type *e) err_free_sbitmap: if (blk_mq_is_sbitmap_shared(q->tag_set->flags)) blk_mq_exit_sched_shared_sbitmap(q); -err_free_tags: +err_free_map_and_rqs: blk_mq_sched_free_requests(q); blk_mq_sched_tags_teardown(q); q->elevator = NULL; -- 2.26.2