Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp727623pxf; Thu, 1 Apr 2021 11:57:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzSOvJ4MFcwG46JA/S4it8ueCGOsU9IWRL1/4GKuDZ6wlczbpLOS+2Z9EueKVJmDAfNojj X-Received: by 2002:aa7:d74d:: with SMTP id a13mr11987108eds.199.1617303475472; Thu, 01 Apr 2021 11:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617303475; cv=none; d=google.com; s=arc-20160816; b=xyE9fixmMVbTo6fOozk/ETftwL/EGuysQvSkKFs4YlmA1xcNrOGHgO252WEbP4oL+q 4EHVTLFf1vKKSCUmtIo7GpkW7uZPIZ3b8EFg1I06COn+cXOqgkOGQvy+Nk1ahfCfGDC+ GSzVvNnaJFm5MvHMK6EFhXzIulsLglhZSeFWmYvYojNSrXRjcild+F2sX+Bq2idm7p4w 774iK646lR8TOPX1MeQc6lUsVGd8HL7PAj9v39mrTkV5A/QmMx/lVoOQo8LpoI97hDpB Aaeko4m4SLE+Zy6+NfD6MBDZd3M4iWtK8IxmJMmQuJKG7jHchoIscA99ktvAQQLn0aVs 5gZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3ABGeqwVjSflF2v2NwkfGGEvt0FHlPNp2jDD7Wn08AU=; b=kaXMrt4vQFRQTrb4RMPZe3yndJLO28KjteLd0vseorDuliW2CpQh3cy0Fm6yfXoTo0 FzgHd5rDM2nq0xk0Y24WRuqAMe7/Amfwutz9h3RjBMuHEzC0Ctja9nG9xAhgtLFeTRrX xS5ZOz5o7QfBKnX4IfJ3MGc/+OJQNgMaqBKe3MG1kKZAmSjUM/Mo+91B/hQCvspL2yKM k6Ej2LkRRDhDBl59FD2WWcnJT4EmOYj2Ol5GqXLARg5fkXXN4P0T1HdUgw/U1y4fj185 Cmcldwh00FTGUyL00Dlmu/q1hZjBqo4qVfADOGGnFTMBoc/i45fDs4HoTainuBJL2LkV sBlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dbI+llyC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si4498816ejy.707.2021.04.01.11.57.33; Thu, 01 Apr 2021 11:57:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dbI+llyC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239942AbhDASzI (ORCPT + 99 others); Thu, 1 Apr 2021 14:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236560AbhDASqn (ORCPT ); Thu, 1 Apr 2021 14:46:43 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2CCDC03117E; Thu, 1 Apr 2021 10:47:26 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id r193so83139ior.9; Thu, 01 Apr 2021 10:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3ABGeqwVjSflF2v2NwkfGGEvt0FHlPNp2jDD7Wn08AU=; b=dbI+llyCF1qsXCU+57jJILTQijq3LOuUqHcBa+PDsJZd+qYeLYTTrxhGY6p/hL6FS9 wAJbCLjYGbywRHj93PpB4vFmO+m5MtJRbkLixlRiIF+GJFoT8DOzAUMnhjB9PD4sKCXc s0TXQ4V052qyHV9jW8fqVjxsCpESkWxaV/4bHZdtuPi5sH7i2s7q1qWvS6T9+oRlXDEU dzx7L1iiHq1TQGJzzO/cUXcOAYWh+tNNocM46kBm3uBWldpm2KKOlGOqM/iQ3yKMAqJH oTNyJVPgFuvSz2K5pLp5cRqdr4eQ4AChyDiR/J92aOEoJ8OKbqahX9atC34oh+XoDhT1 7J+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3ABGeqwVjSflF2v2NwkfGGEvt0FHlPNp2jDD7Wn08AU=; b=Nd/8EpV3kHK/YrFjULvnc4XYxnHtYdqs8Y6LT66j+gk5hgcJHK/00FwlWKaQT8besN gekkQSY8gqkE13mceOetcJbzjqZfTLr9S4yVZMGmCRv/vi2JlX+iFNo/3k/2nz+V32yM BDNZhzl//+w0Q6Y9l9T4jpRE6sEDpO+unCV4xVP7SVY4kqjnxhwsMqPk/1G8+kBDd2zo aoSxxL2bXEe/x6kPnQ0eArDCNFD7xgYMGVim49NAHIobjHWnvF/989gN3V8OxtRwPxv8 AHP1HHkamDC4vOzsCJiUEwstEQEPqzEljmbWl56xlclRzzVV2MVnbmbwYRbcl9pgs2hs mcfA== X-Gm-Message-State: AOAM531CT3hpTnIz+wS6Hso2/SH4YM6ic8edcX2hI0XbMfgssom+znLd lxuLl2IY2tLW7J94iw3Lm2n3VV0KjRGzav41q00= X-Received: by 2002:a05:6602:21cd:: with SMTP id c13mr7436621ioc.44.1617299246197; Thu, 01 Apr 2021 10:47:26 -0700 (PDT) MIME-Version: 1.0 References: <4c259d34b5943bf384fd3cb0d98eccf798a34f0f.1615038553.git.syednwaris@gmail.com> In-Reply-To: From: Syed Nayyar Waris Date: Thu, 1 Apr 2021 23:17:14 +0530 Message-ID: Subject: Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value To: Andy Shevchenko 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 8:54 PM Andy Shevchenko wrote: > > On Sat, Mar 06, 2021 at 07:36:30PM +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. > > ... > > > + u32 *const state = chip->gpio_state; > > Looking at this... What's the point of the const here? > > Am I right that this tells: pointer is a const, while the data underneath > can be modified? > > > + unsigned int *const width = chip->gpio_width; > > Ditto. > > Putting const:s here and there for sake of the const is not good practice. > It makes code harder to read. > > -- > With Best Regards, > Andy Shevchenko > Okay. I will incorporate your comments in my next submission. Thank You. Regards Syed Nayyar Waris