From patchwork Wed Nov 13 17:27:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179338 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp9909466ilf; Wed, 13 Nov 2019 09:30:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzJO0ip8tj0+y8i3zsGQHOXmk1x+Vb2DXhJDdBXfbAxmB/TQkgUUfsr1zJlwICnRt/XMZTs X-Received: by 2002:a17:906:7e41:: with SMTP id z1mr3121077ejr.63.1573666256176; Wed, 13 Nov 2019 09:30:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573666256; cv=none; d=google.com; s=arc-20160816; b=RfaVyn7lKH/ESwjbPSb3HJZ6EEYqt/VtBLWUypsm4czbM5whPZHnWglpgexFhMbc74 kAOWadbjVPk1mIpSz8l6y2Gba6ZfGPYxEovcXLvOcU4DxKQO+G32sfgnKR7wiB6uXQ7J HCpeSLv3/t9SlAYJQ8icV5u949FKIEfHYhOTX0R7D0dsln6ZJYuW4LYKOhEeFiwRNZtN yFNp+tjW6nym/SpttLUtdA87gg+n4vY2/5VecwKN6Hz442uic81ExSbNHm4zohU0FBi1 p7WXSIwpsm4s7RMJDg80lKDvBBc7xx9SCMKj2CXLPdd14Cn9/76TsbgZcOS3HJkQHJsv WpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=ChypqRCMZxUSHjIXIpdbisLz8GQo8iNY3IKjEDDwmaw=; b=Z1+6ahTuQTG0LdBJPsUs231KYSbqYcozMahorlsPW+YDjx+x9fDYMFbbSdit8OdleQ JksqMyhz29POgnvTMeBEr6D0oOK+yISHXPX9NMIaIbhVvcvSf7o8MIg33Y7ONSQ85+1v aMafQOST4cUSk9qbs88qeBAZgTZ5gR0eTQVBYsxL/8sqw7cs9l8f50uHbYeYHMzF2c3G pjXUwtgFH77w2/FcMJ81R8yj5yTjLu50whjgCGU1vOg+zL22K9hVub7F64R2823SgEYt LrzkRxsLTO4GLVD/aiNVspCb2MoN2KtSdufvQ+E1fFdL07WdfO8J7CGgu5/4sLeujGLS bHTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si2362043eda.359.2019.11.13.09.30.55; Wed, 13 Nov 2019 09:30:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727756AbfKMRau (ORCPT + 26 others); Wed, 13 Nov 2019 12:30:50 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:54150 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726392AbfKMRap (ORCPT ); Wed, 13 Nov 2019 12:30:45 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D7A63D7FBDBE91609F52; Thu, 14 Nov 2019 01:30:42 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Thu, 14 Nov 2019 01:30:36 +0800 From: John Garry To: CC: , , John Garry Subject: [PATCH 1/2] blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() Date: Thu, 14 Nov 2019 01:27:21 +0800 Message-ID: <1573666042-176756-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1573666042-176756-1-git-send-email-john.garry@huawei.com> References: <1573666042-176756-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These functions are not referenced, so delete them. Signed-off-by: John Garry --- block/blk-mq-tag.c | 8 -------- block/blk-mq-tag.h | 1 - block/blk-mq.c | 6 ------ include/linux/blk-mq.h | 1 - 4 files changed, 16 deletions(-) -- 2.17.1 diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 008388e82b5c..fbacde454718 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -15,14 +15,6 @@ #include "blk-mq.h" #include "blk-mq-tag.h" -bool blk_mq_has_free_tags(struct blk_mq_tags *tags) -{ - if (!tags) - return true; - - return sbitmap_any_bit_clear(&tags->bitmap_tags.sb); -} - /* * If a previously inactive queue goes active, bump the active user count. * We need to do this before try to allocate driver tag, then even if fail diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h index 61deab0b5a5a..15bc74acb57e 100644 --- a/block/blk-mq-tag.h +++ b/block/blk-mq-tag.h @@ -28,7 +28,6 @@ extern void blk_mq_free_tags(struct blk_mq_tags *tags); extern unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data); extern void blk_mq_put_tag(struct blk_mq_hw_ctx *hctx, struct blk_mq_tags *tags, struct blk_mq_ctx *ctx, unsigned int tag); -extern bool blk_mq_has_free_tags(struct blk_mq_tags *tags); extern int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx, struct blk_mq_tags **tags, unsigned int depth, bool can_grow); diff --git a/block/blk-mq.c b/block/blk-mq.c index 5c9adcaa27ac..323c9cb28066 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -260,12 +260,6 @@ void blk_mq_wake_waiters(struct request_queue *q) blk_mq_tag_wakeup_all(hctx->tags, true); } -bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx) -{ - return blk_mq_has_free_tags(hctx->tags); -} -EXPORT_SYMBOL(blk_mq_can_queue); - /* * Only need start/end time stamping if we have iostat or * blk stats enabled, or using an IO scheduler. diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index dc03e059fdff..11cfd6470b1a 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -424,7 +424,6 @@ void blk_mq_free_tag_set(struct blk_mq_tag_set *set); void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); void blk_mq_free_request(struct request *rq); -bool blk_mq_can_queue(struct blk_mq_hw_ctx *); bool blk_mq_queue_inflight(struct request_queue *q);