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] [day] [month] [year] [list]
Message-ID: <20201109142748.GI1257108@piout.net>
Date:   Mon, 9 Nov 2020 15:27:48 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Lars Povlsen <lars.povlsen@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        devicetree <devicetree@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 2/3] pinctrl: pinctrl-microchip-sgpio: Add pinctrl
 driver for Microsemi Serial GPIO

On 09/11/2020 16:00:16+0200, Andy Shevchenko wrote:
> On Mon, Nov 9, 2020 at 2:07 PM Lars Povlsen <lars.povlsen@...rochip.com> wrote:
> > > On Thu, Oct 29, 2020 at 3:40 PM Lars Povlsen <lars.povlsen@...rochip.com> wrote:
> 
> ...
> 
> > >> +#define __shf(x)               (__builtin_ffs(x) - 1)
> > >> +#define __BF_PREP(bf, x)       (bf & ((x) << __shf(bf)))
> > >> +#define __BF_GET(bf, x)                (((x & bf) >> __shf(bf)))
> > >
> > > Isn't it home grown reimplementation of bitfield.h?
> >
> > This was answered in the aforementioned mail.
> 
> Perhaps it makes sense to add functions like field_get(), field_prep()
> to that header?

IIRC it has been explicitly excluded from bitfield.h to ensure
developers will think about the introduced overhead.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ