lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACG_h5pOJKUQd6h+75_Tiv_VVaUn9Dg9O5UBvQBu_2QWE0E9iw@mail.gmail.com>
Date:   Thu, 1 Apr 2021 23:17:14 +0530
From:   Syed Nayyar Waris <syednwaris@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     bgolaszewski@...libre.com, vilhelm.gray@...il.com,
        michal.simek@...inx.com, arnd@...db.de, rrichter@...vell.com,
        linus.walleij@...aro.org, yamada.masahiro@...ionext.com,
        akpm@...ux-foundation.org, rui.zhang@...el.com,
        daniel.lezcano@...aro.org, amit.kucheria@...durent.com,
        linux-arch@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

On Mon, Mar 29, 2021 at 8:54 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ