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;