Message ID | 20230926052007.3917389-4-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1783708vqu; Tue, 26 Sep 2023 02:32:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8QNR2btbaTA1hmSIJRLs57GWHeodvvldHqJjKnob9PiU261cGv20yDLab9RsoEtf0+ybN X-Received: by 2002:a17:90a:e518:b0:276:ae0f:57c0 with SMTP id t24-20020a17090ae51800b00276ae0f57c0mr6914274pjy.19.1695720734586; Tue, 26 Sep 2023 02:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695720734; cv=none; d=google.com; s=arc-20160816; b=yFo9DiEM/KpbKSTsZXEj2PeAjfeI5NzHDWclpfdyz2ecdptP4cqPF2cV3XCYtn4E9R uuCVMMfUVx8Cxoa+T5qry8KQhtItUKfwcZYyGMNfwbAdG3HpftxawpgrvgUFiJYVwPzq L8j1RKnpnOJHUakuRJYh1W+zcD7fRILmF32cuG+OabUFgrod3Bd9bSHQm54vcOTWU8YN Ir+3PlvNELYrvJ4Bq5F4RkXqtEu5M2n+mpbXGxl+S0APnwquWwbd2dHvFCu5R5f66XcQ 63JLVXpobNb1rU3uJF2pNcLjP1FG1ocNMJTAoWzYCdQijetZ7smpjdB628/VzZjEGp7I Gepg== 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 :dkim-signature; bh=RWH+87FsoZ6xcpwCvWZtbGJ1xS3siXgq3RoFMNrZfo8=; fh=vW1oNT0lvWbI8AMX2u/BZGKXD0nTZmrv2xM94BgUfog=; b=nSc4nhQJD1gOn/fHKdy6b2yJIQ3NPi16+k+uw0iECCjq0spOZJ9MGlDPWJlszKHHb6 fpdZ1KChkFPyLuXdo3z3ugTZ6lie24k2EBSecQS23KAWL3euaf70uHERSZJMoFYJ0fB/ oHCbEDRAFsAo3zhjq/w1MDJVQvNvgIGqHTmqSUdoaWxcQaIlywqKGSt29ULQHTABPX2L cQ2CjiECTmjmH9GRHUgXQp0jC9daxYq94ZWHHItB8nzCplBHBwDmwEYy1rtZR+kfC+sJ jDU/qgPLcTEeRFiCFUHhM1M1KBuOZThLtOmc0YtzjiAgyhU2Nvi4EL6zMUVmNR19E11R Bc+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jBwODYqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x1-20020a17090a970100b0027450695a78si7321695pjo.172.2023.09.26.02.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jBwODYqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D8FFD81F9677; Mon, 25 Sep 2023 22:21:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233678AbjIZFUs (ORCPT <rfc822;ruipengqi7@gmail.com> + 26 others); Tue, 26 Sep 2023 01:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbjIZFUc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 26 Sep 2023 01:20:32 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E04B312A; Mon, 25 Sep 2023 22:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695705625; x=1727241625; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/0/YnXJEcB9BbLqlQjSk46oBKNZtRMAfDcTDuka6q4c=; b=jBwODYqCk5oXJDf6s7w2mXj+RnNta6A7XAjkFwKDOSN+ust9W8v2ITS/ SBJFeLzFF9j/non28Nc5pjBhjrY9eg1CxzzDTJsDhD+FaxIr52bSLZgww UZSLgbkbrU6ABpD2friyG9PPfO7CyWnO7ip3i8vWkHWXxGp+OSl0D+sCV cHSx604LAF4SJ/g+0kD1l6x/zSCGbqmHlenbY/fu+eZSeUGOhaXTTdKMy HTHd5HWyHXOzCGb/e0iu5mHz7HF3tKUzyUyDq/02YPD5gsxnGBCrSOeci xFkCMtFLVpl0ImU4edxgUD+K91nyxrYAEmyZZEBPb8F3IthuW0HjNyqsb Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="360865691" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="360865691" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 22:20:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="748689668" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="748689668" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2023 22:20:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id F04B91C7; Tue, 26 Sep 2023 08:20:18 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Yury Norov <yury.norov@gmail.com>, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>, Srinivas Neeli <srinivas.neeli@amd.com>, Michal Simek <michal.simek@amd.com>, Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org> Subject: [PATCH v1 3/5] gpio: xilinx: Switch to use new bitmap_scatter() helper Date: Tue, 26 Sep 2023 08:20:05 +0300 Message-Id: <20230926052007.3917389-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> References: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 25 Sep 2023 22:21:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778092064675503255 X-GMAIL-MSGID: 1778092064675503255 |
Series |
bitmap: get rid of bitmap_remap() and bitmap_biremap() uses
|
|
Commit Message
Andy Shevchenko
Sept. 26, 2023, 5:20 a.m. UTC
bitmaps_scatter() produces a sparse bitmap based on the dense one
and a given mask. In this driver the given mask is hw_map, while
sw_map is of sequential bits. We may use the bitmap_scatter() helper
instead of bitmap_remap(), because it's optimized for our case.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-xilinx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index a16945e8319e..f103c30cc74f 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -208,8 +208,8 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, unsigned long flags; struct xgpio_instance *chip = gpiochip_get_data(gc); - bitmap_remap(hw_mask, mask, chip->sw_map, chip->hw_map, 64); - bitmap_remap(hw_bits, bits, chip->sw_map, chip->hw_map, 64); + bitmap_scatter(hw_mask, mask, chip->hw_map, 64); + bitmap_scatter(hw_bits, bits, chip->hw_map, 64); spin_lock_irqsave(&chip->gpio_lock, flags);