Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571182
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] percpu fix for v4.10-rc6 |
| Date | 2017-01-31 23:30 +0100 |
| Message-ID | <t5P62-6fV-27@gated-at.bofh.it> (permalink) |
| References | <t5JWG-33f-9@gated-at.bofh.it> <t5Otj-5NY-5@gated-at.bofh.it> <t5Otj-5NY-3@gated-at.bofh.it> <t5OWm-6cJ-33@gated-at.bofh.it> <t5P62-6fV-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL] percpu fix for v4.10-rc6 Tejun Heo <tj@kernel.org> - 2017-01-31 18:00 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2017-01-31 22:50 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2017-01-31 22:50 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Tejun Heo <tj@kernel.org> - 2017-01-31 23:20 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Tejun Heo <tj@kernel.org> - 2017-01-31 23:30 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-01 01:40 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2017-01-31 23:30 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 David Howells <dhowells@redhat.com> - 2017-02-01 09:00 +0100
Re: [GIT PULL] percpu fix for v4.10-rc6 David Howells <dhowells@redhat.com> - 2017-02-01 11:10 +0100
csiph-web