From: Andrew Morton <akpm@linux-foundation.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mathias Duckeck <m.duckeck@kunbus.de>,
Phil Elwell <phil@raspberrypi.org>,
linux-gpio@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@redhat.com>, Neil Brown <neilb@suse.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Theodore Ts'o <tytso@mit.edu>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] bitops: Introduce assign_bit()
Date: Thu, 12 Oct 2017 11:30:17 -0700 [thread overview]
Message-ID: <20171012113017.a088595ca60df1d591aebe38@linux-foundation.org> (raw)
In-Reply-To: <2ca70faf07383482eed6263c00cf9141f930653b.1507797496.git.lukas@wunner.de>
On Thu, 12 Oct 2017 12:40:10 +0200 Lukas Wunner <lukas@wunner.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)".
Acked-by: Andrew Morton <akpm@linux-foundation.org>
next prev parent reply other threads:[~2017-10-12 18:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 10:40 [PATCH v2 0/5] GPIO driver for Maxim MAX3191x Lukas Wunner
2017-10-12 10:40 ` [PATCH v2 1/5] bitops: Introduce assign_bit() Lukas Wunner
2017-10-12 18:30 ` Andrew Morton [this message]
2017-10-13 12:44 ` Linus Walleij
[not found] ` <cover.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-12 10:40 ` [PATCH v2 4/5] dt-bindings: gpio: max3191x: Document new driver Lukas Wunner
2017-10-17 20:30 ` Rob Herring
[not found] ` <57660f421f2080914940806394a9365ac959f5a8.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-19 20:36 ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 5/5] gpio: Add driver for Maxim MAX3191x industrial serializer Lukas Wunner
2017-10-13 11:11 ` Lukas Wunner
2017-10-13 16:53 ` David Daney
2017-10-13 21:29 ` Lukas Wunner
2017-10-13 22:12 ` David Daney
2017-10-14 11:24 ` Lukas Wunner
2017-10-19 20:41 ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 2/5] gpio: Introduce ->get_multiple callback Lukas Wunner
2017-10-13 12:46 ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 3/5] dt-bindings: Document common property for daisy-chained devices Lukas Wunner
[not found] ` <f0c3b0c5514f74717c5783360b60062dfe9b8c0f.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-15 11:30 ` Jonathan Cameron
2017-10-17 20:32 ` Rob Herring
2017-10-19 20:35 ` Linus Walleij
2017-10-13 12:48 ` [PATCH v2 0/5] GPIO driver for Maxim MAX3191x Linus Walleij
2017-10-13 12:48 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171012113017.a088595ca60df1d591aebe38@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=agk@redhat.com \
--cc=bart.vanassche@wdc.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=m.duckeck@kunbus.de \
--cc=mingo@redhat.com \
--cc=neilb@suse.com \
--cc=peterz@infradead.org \
--cc=phil@raspberrypi.org \
--cc=snitzer@redhat.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.