Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp527422pxf; Thu, 8 Apr 2021 07:57:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+fdOFxx8NJW3i4/21v/9mhhuwuDG5qumKuWKMhMxjzOOCB4ObZrPtSCZ9HM+NLvehYaN8 X-Received: by 2002:a05:6402:151a:: with SMTP id f26mr12004616edw.43.1617893852045; Thu, 08 Apr 2021 07:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617893852; cv=none; d=google.com; s=arc-20160816; b=S8RK++ri8F/QG8paQb5Oohsvy0YfQz3uoOhe0GVBIXp2p4c6z5BqWQ27Qn+FtL7Vu9 X+rHFrrRwrylxm2nPAcjUeJPvH6ct5VG7wH82F1cYzkyR1TkR4fIDTbCU0iYt9yw341k hWq/lPmtYb6hh7JgkyusbtqzsbtMR6SfKtRxfyGaezR5wdAZBjPESFhzQP1qQTXw9kr0 ZqyxsTwRxOf+uesEBOyNWyMcnatGTzHcYsLHCe/6hLi+YfKMmvoK2Y0Ef0C28hwRo8Gw ybpc1AP8w2F+P2J09XEKmlfSQ7CUGFViEdLcrF0T8wmosXbU26MgtPKkTNhzgV8Bs0Ls TQDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=LuepgsRm3uF6aYfzVC7vqOiWIz+QzhJcxjzrO8+F0zw=; b=0S/RV3SNcEIapR/EI8ee2XYjPVZRBnJKkd0LdT5bAFnefKVL888DFEe4V/3Kq2pdsU oHzdwxePEs++fWSmty8N5pErRowDtcSnUmXsWVFAab/1S1AsqvqPjSlDBvLecfbKqQ0Y ybV5PchdG64/YXUHbTgzFAiCrmoC7zpE6ZKumqVwPdOO6i7mGouUbZj4o/5FSk1v1ARi sfv7pcyA3X3KqUhfpCQVReKwtnraWhirXXELBxueO+SrrfIiyXHuEhto1OW67sayaLl3 IXU+Eos3SQpH3Tw/hMW7LLd1hKGfdj5qqcu6NJOBjGgNqIqP2Te8ySEGX1d19O8Q8ber C2kQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si23572357edv.514.2021.04.08.07.57.09; Thu, 08 Apr 2021 07:57:32 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231934AbhDHO4E (ORCPT + 99 others); Thu, 8 Apr 2021 10:56:04 -0400 Received: from mga14.intel.com ([192.55.52.115]:56204 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbhDHO4D (ORCPT ); Thu, 8 Apr 2021 10:56:03 -0400 IronPort-SDR: bqdhx42IfTgNa7h1KoNkdpCxPeSB4hDR/gtp9s3r0vvsKmBYDEXRm7DyOLZlnI9ivB6bSY56e0 B1nAscgXXxhw== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="193098971" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="193098971" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 07:55:52 -0700 IronPort-SDR: u3SAzauGM3qMBFzJYep86skF9gApXYXbhGx7vZs839F5et0Sgjej8ukSdJC9sjQYY0cWlpe4qR kRpLouaWSlmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="449705839" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 08 Apr 2021 07:55:49 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 03A5B93; Thu, 8 Apr 2021 17:56:04 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , Bartosz Golaszewski , Yury Norov , Rasmus Villemoes , Syed Nayyar Waris , vilhelm.gray@gmail.com Subject: [PATCH v1 1/5] bitmap: Make bitmap_remap() and bitmap_bitremap() available to users Date: Thu, 8 Apr 2021 17:55:57 +0300 Message-Id: <20210408145601.68651-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210408145601.68651-1-andriy.shevchenko@linux.intel.com> References: <20210408145601.68651-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the bitmap_remap() and bitmap_bitremap() are available only for CONFIG_NUMA=y case, while some users may benefit out of it and being independent to NUMA code. Make them available to users by moving out of ifdeffery and exporting for modules. Signed-off-by: Andy Shevchenko --- lib/bitmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 74ceb02f45e3..7b6b2a67a6a6 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -784,8 +784,6 @@ int bitmap_parse(const char *start, unsigned int buflen, } EXPORT_SYMBOL(bitmap_parse); - -#ifdef CONFIG_NUMA /** * bitmap_pos_to_ord - find ordinal of set bit at given position in bitmap * @buf: pointer to a bitmap @@ -894,6 +892,7 @@ void bitmap_remap(unsigned long *dst, const unsigned long *src, set_bit(bitmap_ord_to_pos(new, n % w, nbits), dst); } } +EXPORT_SYMBOL(bitmap_remap); /** * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit @@ -931,7 +930,9 @@ int bitmap_bitremap(int oldbit, const unsigned long *old, else return bitmap_ord_to_pos(new, n % w, bits); } +EXPORT_SYMBOL(bitmap_bitremap); +#ifdef CONFIG_NUMA /** * bitmap_onto - translate one bitmap relative to another * @dst: resulting translated bitmap -- 2.30.2