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); From patchwork Wed Nov 13 17:27:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 179339 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp9909483ilf; Wed, 13 Nov 2019 09:30:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxwSYdqMv83shjV2yuhb6peAWrYOxNc3BdVFN2zFUjcADfPW4p866P7dn/B0gbCDd+1m9dG X-Received: by 2002:aa7:c894:: with SMTP id p20mr5024877eds.145.1573666256636; 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=Xr52JuFYfNSgi1Y6Huwwi4uLGL95kjeqVR+J4lntWt3kx/gkAgqEXn29fK9+6NqmhW aENHSdKGYiIm4jZviazjlZoM4LK7AeGv5p15pZz+0/VO5SxStL83HtRmXIwkpPhEYvNZ eU/4NzLU/K4YTj/VhexudkYRju2OoqUGdkdauoL7w1JnimFtRTg1P79xP/P2wRbvMO+u MiCVx6zNCnXNQ5RPMj5SZHr5toN9b1feWYgZCNHsMAIFmxVWxD9Dkim4Adiv/rafg1HP VMZccYoIJorc6IcAcTp0WZ+f6d0U6zz4WpwMhVRGAtn1UxuzOgav2ohdN0nUv8YSAAaR 5vcQ== 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=TMVrlCpFvXr94J0n7faH68dG58vjYd/gq4wCsdgID4U=; b=Nfe8CK7SW7qZV0EiikDQKCf3NWjmuoDPBMLLsEuOLeFgzalr3pJwgWzietwhLav2eH F5qAG7cbCT4xov/vRrUBz2ETo5qRqqZAQnKXZg9sxVZsMQqvvVQpR807Xd/wop1lcxL+ 6Rka0SUzTO1IwrVOo7/QKF9u9dYn38/ut1x9ePXIRsVbElBmW/nbabytEUj8Muuw6dqb Kz762TZhdVhnR89MHkrhIjAHFtirz1fe+2f5mgDiZOYyVHEgeIR0+7MmWlWVpYY7/ddR uvOjYRpzpGdzuz7gy3k4k/6MFiIEmvSU+MaJoUmtoARjpWOYOydqN69ASWp9Hjz9KvgV cUjw== 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.56; 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 S1727538AbfKMRat (ORCPT + 26 others); Wed, 13 Nov 2019 12:30:49 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:54148 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726350AbfKMRap (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 E04425BCBE64080B92D2; 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:37 +0800 From: John Garry To: CC: , , John Garry Subject: [PATCH 2/2] sbitmap: Delete sbitmap_any_bit_clear() Date: Thu, 14 Nov 2019 01:27:22 +0800 Message-ID: <1573666042-176756-3-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 Since the only caller of this function has been deleted, delete this one also. Signed-off-by: John Garry --- include/linux/sbitmap.h | 9 --------- lib/sbitmap.c | 17 ----------------- 2 files changed, 26 deletions(-) -- 2.17.1 diff --git a/include/linux/sbitmap.h b/include/linux/sbitmap.h index a986ac12a848..e40d019c3d9d 100644 --- a/include/linux/sbitmap.h +++ b/include/linux/sbitmap.h @@ -216,15 +216,6 @@ int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint, */ bool sbitmap_any_bit_set(const struct sbitmap *sb); -/** - * sbitmap_any_bit_clear() - Check for an unset bit in a &struct - * sbitmap. - * @sb: Bitmap to check. - * - * Return: true if any bit in the bitmap is clear, false otherwise. - */ -bool sbitmap_any_bit_clear(const struct sbitmap *sb); - #define SB_NR_TO_INDEX(sb, bitnr) ((bitnr) >> (sb)->shift) #define SB_NR_TO_BIT(sb, bitnr) ((bitnr) & ((1U << (sb)->shift) - 1U)) diff --git a/lib/sbitmap.c b/lib/sbitmap.c index 969e5400a615..33feec8989f1 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c @@ -236,23 +236,6 @@ bool sbitmap_any_bit_set(const struct sbitmap *sb) } EXPORT_SYMBOL_GPL(sbitmap_any_bit_set); -bool sbitmap_any_bit_clear(const struct sbitmap *sb) -{ - unsigned int i; - - for (i = 0; i < sb->map_nr; i++) { - const struct sbitmap_word *word = &sb->map[i]; - unsigned long mask = word->word & ~word->cleared; - unsigned long ret; - - ret = find_first_zero_bit(&mask, word->depth); - if (ret < word->depth) - return true; - } - return false; -} -EXPORT_SYMBOL_GPL(sbitmap_any_bit_clear); - static unsigned int __sbitmap_weight(const struct sbitmap *sb, bool set) { unsigned int i, weight = 0;