From: Tejun Heo <tj@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
dougmill@linux.vnet.ibm.com
Subject: Re: [GIT PULL] percpu fix for v4.10-rc6
Date: Tue, 31 Jan 2017 17:27:07 -0500 [thread overview]
Message-ID: <20170131222707.GA5919@htj.duckdns.org> (raw)
In-Reply-To: <CA+55aFyn+pVeZKA1wEdbBMku_2UCL7BuUX1O_RvHpH5LJXEy5Q@mail.gmail.com>
On Tue, Jan 31, 2017 at 02:17:10PM -0800, Linus Torvalds wrote:
> Because there definitely have been users of the bitop routines that
> assign the result to an "int", and I have some dim memory of us also
> having had things like drivers that made their own "bool" variables
> and use "char" for them.
>
> But I'm not seeing it. The generic bitop pattern seems to be
>
> static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
> ...
> return (old & mask) != 0;
>
> which is fine.
>
> Just exactly what code did you look at?
My bad. I misread the generic test_bit() code and was reading the
inner helper of ppc, DEFINE_TESTOP macro, which returns the masked
value. We used to have this problem, right? I seem to have a memory
of hitting this issue.
Is there a reason we don't make these functions explicitly return
bool? To avoid unnecessary boolean conversion by the compiler? If
so, there gotta be a way to avoid that.
Thanks.
--
tejun
next prev parent reply other threads:[~2017-01-31 22:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170131165537.GC23970@htj.duckdns.org>
2017-01-31 21:32 ` [GIT PULL] percpu fix for v4.10-rc6 Linus Torvalds
2017-01-31 21:41 ` Linus Torvalds
2017-01-31 22:11 ` Tejun Heo
2017-01-31 22:11 ` Tejun Heo
2017-01-31 22:17 ` Linus Torvalds
2017-01-31 22:27 ` Tejun Heo [this message]
2017-02-01 0:32 ` Linus Torvalds
2017-02-01 0:32 ` Linus Torvalds
2017-02-01 5:46 ` Michael Ellerman
2017-02-01 7:56 ` David Howells
[not found] ` <CA+55aFyiy2jD80RTbsm3C=G5ifgtj8GQHqFwaYZM+ktgx1embA@mail.gmail.com>
[not found] ` <CA+55aFxRLP_qPBXoLomxj-VYG-R=rKJE8KZ_h4NQ4g74gpNEWQ@mail.gmail.com>
[not found] ` <CA+55aFz8TFRykr0qNBjNbK+kavUdbGOm4huf5XhPLQcy0tMyLw@mail.gmail.com>
2017-02-01 10:00 ` David Howells
2017-02-01 10:00 ` David Howells
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=20170131222707.GA5919@htj.duckdns.org \
--to=tj@kernel.org \
--cc=dougmill@linux.vnet.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox