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: <CACRpkdYwoYQcyiSwycE3xRwc_x_kAmVVTLmXMBRBv84qi=Rygw@mail.gmail.com>
Date:   Fri, 13 Oct 2017 14:44:35 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     Mathias Duckeck <m.duckeck@...bus.de>,
        Phil Elwell <phil@...pberrypi.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Bart Van Assche <bart.vanassche@....com>,
        Alasdair Kergon <agk@...hat.com>,
        Mike Snitzer <snitzer@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Neil Brown <neilb@...e.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        "Theodore Ts'o" <tytso@....edu>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/5] bitops: Introduce assign_bit()

On Thu, Oct 12, 2017 at 12:40 PM, Lukas Wunner <lukas@...ner.de> wrote:

> A common idiom is to assign a value to a bit with:
>
>     if (value)
>         set_bit(nr, addr);
>     else
>         clear_bit(nr, addr);
>
> Likewise common is the one-line expression variant:
>
>     value ? set_bit(nr, addr) : clear_bit(nr, addr);
>
> Commit 9a8ac3ae682e ("dm mpath: cleanup QUEUE_IF_NO_PATH bit
> manipulation by introducing assign_bit()") introduced assign_bit()
> to the md subsystem for brevity.
>
> Make it available to others, specifically gpiolib and the upcoming
> driver for Maxim MAX3191x industrial serializer chips.
>
> As requested by Peter Zijlstra, change the argument order to reflect
> traditional "dst = src" in C, hence "assign_bit(nr, addr, value)".
>
> Cc: Bart Van Assche <bart.vanassche@....com>
> Cc: Alasdair Kergon <agk@...hat.com>
> Cc: Mike Snitzer <snitzer@...hat.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Neil Brown <neilb@...e.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Theodore Ts'o <tytso@....edu>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: Denys Vlasenko <dvlasenk@...hat.com>
> Signed-off-by: Lukas Wunner <lukas@...ner.de>

This v2 applied with Andrew's ACK.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ