From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BE57C433B4 for ; Thu, 8 Apr 2021 13:44:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22F2F6115B for ; Thu, 8 Apr 2021 13:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231753AbhDHNoT (ORCPT ); Thu, 8 Apr 2021 09:44:19 -0400 Received: from mga14.intel.com ([192.55.52.115]:49529 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbhDHNoT (ORCPT ); Thu, 8 Apr 2021 09:44:19 -0400 IronPort-SDR: D0IDdpfWIPGn71mElnTLQpn/Azhp9Ocee2S1xKw4e/VDboEPJy6FnCA6YvydRcfsyuLVzcb7PA bB34oavQ42jQ== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="193083305" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="193083305" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 06:44:08 -0700 IronPort-SDR: pNrSlgTlZdTqtJX7jbiAg0jD68NtTajV16pphbVVkRI//nol6aVyCEb9VhRN50o5sv3qWzJH17 3Xys1RtdtFPw== X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="441760078" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 06:44:04 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lUUwz-002IhZ-2n; Thu, 08 Apr 2021 16:44:01 +0300 Date: Thu, 8 Apr 2021 16:44:01 +0300 From: Andy Shevchenko To: Syed Nayyar Waris Cc: bgolaszewski@baylibre.com, vilhelm.gray@gmail.com, michal.simek@xilinx.com, arnd@arndb.de, rrichter@marvell.com, linus.walleij@linaro.org, yamada.masahiro@socionext.com, akpm@linux-foundation.org, rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, linux-arch@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: Re: [RESEND PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Fri, Apr 02, 2021 at 10:07:36PM +0530, Syed Nayyar Waris wrote: > This patch reimplements the xgpio_set_multiple() function in > drivers/gpio/gpio-xilinx.c to use the new generic functions: > bitmap_get_value() and bitmap_set_value(). The code is now simpler > to read and understand. Moreover, instead of looping for each bit > in xgpio_set_multiple() function, now we can check each channel at > a time and save cycles. As promised, I have looked at this with a fresh eye and NAK from me. Sorry. This is less than a half baked solution. I spent couple of evenings, so I'll come up with full conversion of this driver to the bitmap API. And yes, as I have told you like half a year before, bitmap_get_value32() and bitmap_set_value32() is much more useful (and I actually implemented them locally for the sake of conversion). So, summarize this I do not think we have real users of the proposed API. -- With Best Regards, Andy Shevchenko