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  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]
Date:   Fri, 31 Aug 2018 11:14:31 +0200
From:   Linus Walleij <>
To:     Janusz Krzysztofik <>
Cc:     Jonathan Corbet <>,
        Miguel Ojeda Sandonis <>,
        Peter Korsgaard <>,
        Peter Rosin <>,
        Ulf Hansson <>,
        Andrew Lunn <>,
        Florian Fainelli <>,
        "David S. Miller" <>,
        Dominik Brodowski <>,
        Greg KH <>,,
        Lars-Peter Clausen <>,
        Michael Hennerich <>,
        Jonathan Cameron <>,
        Hartmut Knaack <>,
        Peter Meerwald <>,
        Jiri Slaby <>, Willy Tarreau <>,
        Geert Uytterhoeven <>,,,
        linux-mmc <>,
        netdev <>,,,,
        "open list:GPIO SUBSYSTEM" <>,
        "" <>
Subject: Re: [PATCH v5 1/4] gpiolib: Pass bitmaps, not integer arrays, to
 get/set array

On Wed, Aug 29, 2018 at 10:48 PM Janusz Krzysztofik <> wrote:

So it's no secret that I strongly fancy this patch set.

What would be great at this point is to have some people test
that the drivers still work as expected, even better if they can do
some benchmarking.

> -               values[PIN_DATA0 + i] = !!(val & BIT(i));
> -       values[PIN_CTRL_RS] = rs;
> +       value_bitmap[0] = val;
> +       __assign_bit(PIN_CTRL_RS, value_bitmap, rs);
>         n = 9;
>         if (hd->pins[PIN_CTRL_RW]) {
> -               values[PIN_CTRL_RW] = 0;
> +               __clear_bit(PIN_CTRL_RW, value_bitmap);

This seems fine to me, but I understand the comment that the
code becomes harder to read.

I think part of it is those __assign_bit() and __clear_bit() with
the double-underscore of unclear meaning. The meaning is
"non atomic" IIRC, so maybe I should move forward
with my plan to send a sed script to Torvalds just renaming all
of those to something sane in the next merge window.

Like __assign_bit() -> assign_bit_nonatomic()

Linus Walleij

Powered by blists - more mailing lists