> On Nov 5, 2018, at 14:13, Andrew Morton <a...@linux-foundation.org> wrote: > >> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche <bvanass...@acm.org> >> wrote: >> - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; >> + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; >> } >> >> /* > > I suppose so. > > That function seems too clever for its own good :(. I wonder if these > branch-avoiding tricks are really worthwhile. At the very least I'd like to see some comments added as to why that approach was taken for the sake of future maintainers. William Kucharski
- Re: [PATCH] slab.h: Avoid using & for logical a... Bart Van Assche
- Re: [PATCH] slab.h: Avoid using & for logic... Rasmus Villemoes
- Re: [PATCH] slab.h: Avoid using & for l... Bart Van Assche
- Re: [PATCH] slab.h: Avoid using & f... Alexander Duyck
- Re: [PATCH] slab.h: Avoid using &a... Bart Van Assche
- Re: [PATCH] slab.h: Avoid usin... Alexander Duyck
- Re: [PATCH] slab.h: Avoid usin... Bart Van Assche
- Re: [PATCH] slab.h: Avoid usin... Alexander Duyck
- Re: [PATCH] slab.h: Avoid usin... Bart Van Assche
- Re: [PATCH] slab.h: Avoid usin... Alexander Duyck
- Re: [PATCH] slab.h: Avoid using & for logical a... William Kucharski
- Re: [PATCH] slab.h: Avoid using & for logical and of... Vlastimil Babka
- RE: [PATCH] slab.h: Avoid using & for logical and of... David Laight
- Re: [PATCH] slab.h: Avoid using & for logical a... Vlastimil Babka
- RE: [PATCH] slab.h: Avoid using & for logic... David Laight
- Re: [PATCH] slab.h: Avoid using & for l... Vlastimil Babka
- RE: [PATCH] slab.h: Avoid using & f... David Laight