Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-21 Thread Vlastimil Babka
On 11/13/18 7:22 PM, Vlastimil Babka wrote: > On 11/12/18 10:55 AM, David Laight wrote: >> From: Vlastimil Babka [mailto:vba...@suse.cz] >>> Sent: 09 November 2018 19:16 >> ... >>> This? Not terribly elegant, but I don't see a nicer way right now... >> >> Maybe just have two copies of the function

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-21 Thread Vlastimil Babka
On 11/13/18 7:22 PM, Vlastimil Babka wrote: > On 11/12/18 10:55 AM, David Laight wrote: >> From: Vlastimil Babka [mailto:vba...@suse.cz] >>> Sent: 09 November 2018 19:16 >> ... >>> This? Not terribly elegant, but I don't see a nicer way right now... >> >> Maybe just have two copies of the function

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-19 Thread Vlastimil Babka
On 11/19/18 12:04 PM, Pavel Machek wrote: > On Mon 2018-11-05 12:40:00, Bart Van Assche wrote: >> This patch suppresses the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y >> >> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") >>

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-19 Thread Vlastimil Babka
On 11/19/18 12:04 PM, Pavel Machek wrote: > On Mon 2018-11-05 12:40:00, Bart Van Assche wrote: >> This patch suppresses the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y >> >> Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") >>

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-19 Thread Pavel Machek
On Mon 2018-11-05 12:40:00, Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-19 Thread Pavel Machek
On Mon 2018-11-05 12:40:00, Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-13 Thread Vlastimil Babka
On 11/12/18 10:55 AM, David Laight wrote: > From: Vlastimil Babka [mailto:vba...@suse.cz] >> Sent: 09 November 2018 19:16 > ... >> This? Not terribly elegant, but I don't see a nicer way right now... > > Maybe just have two copies of the function body? > > static __always_inline enum

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-13 Thread Vlastimil Babka
On 11/12/18 10:55 AM, David Laight wrote: > From: Vlastimil Babka [mailto:vba...@suse.cz] >> Sent: 09 November 2018 19:16 > ... >> This? Not terribly elegant, but I don't see a nicer way right now... > > Maybe just have two copies of the function body? > > static __always_inline enum

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-12 Thread David Laight
From: Vlastimil Babka [mailto:vba...@suse.cz] > Sent: 09 November 2018 19:16 ... > This? Not terribly elegant, but I don't see a nicer way right now... Maybe just have two copies of the function body? static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags) { #ifndef

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-12 Thread David Laight
From: Vlastimil Babka [mailto:vba...@suse.cz] > Sent: 09 November 2018 19:16 ... > This? Not terribly elegant, but I don't see a nicer way right now... Maybe just have two copies of the function body? static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags) { #ifndef

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/9/18 8:47 PM, Darryl T. Agostinelli wrote: > On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote: >> On 11/9/18 8:00 PM, Andrew Morton wrote: >>> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: >>> Multiple people have reported the following sparse warning:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/9/18 8:47 PM, Darryl T. Agostinelli wrote: > On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote: >> On 11/9/18 8:00 PM, Andrew Morton wrote: >>> On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: >>> Multiple people have reported the following sparse warning:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Darryl T. Agostinelli
On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote: > On 11/9/18 8:00 PM, Andrew Morton wrote: > > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > > > >> Multiple people have reported the following sparse warning: > >> > >> ./include/linux/slab.h:332:43: warning: dubious:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Darryl T. Agostinelli
On Fri, Nov 09, 2018 at 08:16:07PM +0100, Vlastimil Babka wrote: > On 11/9/18 8:00 PM, Andrew Morton wrote: > > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > > > >> Multiple people have reported the following sparse warning: > >> > >> ./include/linux/slab.h:332:43: warning: dubious:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/9/18 8:00 PM, Andrew Morton wrote: > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > >> Multiple people have reported the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y >> >> The minimal fix would be to change the logical & to boolean &&,

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/9/18 8:00 PM, Andrew Morton wrote: > On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > >> Multiple people have reported the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y >> >> The minimal fix would be to change the logical & to boolean &&,

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Andrew Morton
On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > Multiple people have reported the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > The minimal fix would be to change the logical & to boolean &&, which emits > the > same code, but Andrew has

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Andrew Morton
On Fri, 9 Nov 2018 09:12:09 +0100 Vlastimil Babka wrote: > Multiple people have reported the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > The minimal fix would be to change the logical & to boolean &&, which emits > the > same code, but Andrew has

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/7/18 11:41 AM, David Laight wrote: > From: Vlastimil Babka >> Sent: 06 November 2018 12:51 >> >> On 11/6/18 12:07 PM, David Laight wrote: >>> From: Vlastimil Babka [mailto:vba...@suse.cz] >>> 0020 : >>> 20: 40 f6 c7 11 test $0x11,%dil >>> 24: 75 03

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Vlastimil Babka
On 11/7/18 11:41 AM, David Laight wrote: > From: Vlastimil Babka >> Sent: 06 November 2018 12:51 >> >> On 11/6/18 12:07 PM, David Laight wrote: >>> From: Vlastimil Babka [mailto:vba...@suse.cz] >>> 0020 : >>> 20: 40 f6 c7 11 test $0x11,%dil >>> 24: 75 03

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-07 Thread David Laight
From: Vlastimil Babka > Sent: 06 November 2018 12:51 > > On 11/6/18 12:07 PM, David Laight wrote: > > From: Vlastimil Babka [mailto:vba...@suse.cz] > >> Sent: 06 November 2018 10:22 > > ... > -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; > +return

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-07 Thread David Laight
From: Vlastimil Babka > Sent: 06 November 2018 12:51 > > On 11/6/18 12:07 PM, David Laight wrote: > > From: Vlastimil Babka [mailto:vba...@suse.cz] > >> Sent: 06 November 2018 10:22 > > ... > -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; > +return

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Alexander Duyck
On Tue, Nov 6, 2018 at 9:48 AM Bart Van Assche wrote: > > On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote: > > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > > > > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > > > If we really don't care then why even bother

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Alexander Duyck
On Tue, Nov 6, 2018 at 9:48 AM Bart Van Assche wrote: > > On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote: > > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > > > > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > > > If we really don't care then why even bother

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Bart Van Assche
On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote: > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > > If we really don't care then why even bother with the switch statement > > > anyway? It seems like you could

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Bart Van Assche
On Tue, 2018-11-06 at 09:20 -0800, Alexander Duyck wrote: > On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > > If we really don't care then why even bother with the switch statement > > > anyway? It seems like you could

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > If we really don't care then why even bother with the switch statement > > anyway? It seems like you could just do one ternary operator and be > > done with it. Basically all

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 4:32 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > > If we really don't care then why even bother with the switch statement > > anyway? It seems like you could just do one ternary operator and be > > done with it. Basically all

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/6/18 12:07 PM, David Laight wrote: > From: Vlastimil Babka [mailto:vba...@suse.cz] >> Sent: 06 November 2018 10:22 > ... - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; >>> >>> ISTM that changing

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/6/18 12:07 PM, David Laight wrote: > From: Vlastimil Babka [mailto:vba...@suse.cz] >> Sent: 06 November 2018 10:22 > ... - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; >>> >>> ISTM that changing

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread David Laight
From: Vlastimil Babka [mailto:vba...@suse.cz] > Sent: 06 November 2018 10:22 ... > >> - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; > >> + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; > > > > ISTM that changing is_dma and is_reclaimable from int to bool will

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread David Laight
From: Vlastimil Babka [mailto:vba...@suse.cz] > Sent: 06 November 2018 10:22 ... > >> - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; > >> + return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; > > > > ISTM that changing is_dma and is_reclaimable from int to bool will

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/6/18 11:08 AM, David Laight wrote: > From: Bart Van Assche >> Sent: 05 November 2018 20:40 >> >> This patch suppresses the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y BTW, I wonder why the warnings appeared only now, after maybe months in

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/6/18 11:08 AM, David Laight wrote: > From: Bart Van Assche >> Sent: 05 November 2018 20:40 >> >> This patch suppresses the following sparse warning: >> >> ./include/linux/slab.h:332:43: warning: dubious: x & !y BTW, I wonder why the warnings appeared only now, after maybe months in

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread David Laight
From: Bart Van Assche > Sent: 05 November 2018 20:40 > > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc:

RE: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread David Laight
From: Bart Van Assche > Sent: 05 November 2018 20:40 > > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc:

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread William Kucharski
> On Nov 5, 2018, at 14:13, Andrew Morton wrote: > >> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche >> wrote: >> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; >> +return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; >> } >> >> /* > > I suppose so.

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread William Kucharski
> On Nov 5, 2018, at 14:13, Andrew Morton wrote: > >> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche >> wrote: >> -return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; >> +return type_dma + is_reclaimable * !is_dma * KMALLOC_RECLAIM; >> } >> >> /* > > I suppose so.

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/5/18 9:40 PM, Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc: Christoph

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-06 Thread Vlastimil Babka
On 11/5/18 9:40 PM, Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") > Cc: Vlastimil Babka > Cc: Mel Gorman > Cc: Christoph

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > If we really don't care then why even bother with the switch statement > anyway? It seems like you could just do one ternary operator and be > done with it. Basically all you need is: > return (defined(CONFIG_ZONE_DMA) && (flags &

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 16:11 -0800, Alexander Duyck wrote: > If we really don't care then why even bother with the switch statement > anyway? It seems like you could just do one ternary operator and be > done with it. Basically all you need is: > return (defined(CONFIG_ZONE_DMA) && (flags &

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 4:01 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote: > > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > > How about this version, still untested? My compiler is able to evaluate > > > the switch expression if the argument

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 4:01 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote: > > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > > How about this version, still untested? My compiler is able to evaluate > > > the switch expression if the argument

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote: > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > How about this version, still untested? My compiler is able to evaluate > > the switch expression if the argument is constant. > > > > static __always_inline enum

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 14:48 -0800, Alexander Duyck wrote: > On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > How about this version, still untested? My compiler is able to evaluate > > the switch expression if the argument is constant. > > > > static __always_inline enum

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote: > > Won't that pessimize the cases where gfp is a constant to actually do > > the table lookup, and add 16 bytes to every translation unit? > > > > Another option is to add a fake

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Alexander Duyck
On Mon, Nov 5, 2018 at 2:41 PM Bart Van Assche wrote: > > On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote: > > Won't that pessimize the cases where gfp is a constant to actually do > > the table lookup, and add 16 bytes to every translation unit? > > > > Another option is to add a fake

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote: > Won't that pessimize the cases where gfp is a constant to actually do > the table lookup, and add 16 bytes to every translation unit? > > Another option is to add a fake KMALLOC_DMA_RECLAIM so the > kmalloc_caches[] array has size 4,

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 23:14 +0100, Rasmus Villemoes wrote: > Won't that pessimize the cases where gfp is a constant to actually do > the table lookup, and add 16 bytes to every translation unit? > > Another option is to add a fake KMALLOC_DMA_RECLAIM so the > kmalloc_caches[] array has size 4,

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Rasmus Villemoes
On 2018-11-05 22:48, Bart Van Assche wrote: > On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote: >> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche >> wrote: >> >>> This patch suppresses the following sparse warning: >>> >>> ./include/linux/slab.h:332:43: warning: dubious: x & !y >>> >>>

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Rasmus Villemoes
On 2018-11-05 22:48, Bart Van Assche wrote: > On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote: >> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche >> wrote: >> >>> This patch suppresses the following sparse warning: >>> >>> ./include/linux/slab.h:332:43: warning: dubious: x & !y >>> >>>

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote: > On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote: > > > This patch suppresses the following sparse warning: > > > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > > > ... > > > > --- a/include/linux/slab.h > > +++

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote: > On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote: > > > This patch suppresses the following sparse warning: > > > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > > > ... > > > > --- a/include/linux/slab.h > > +++

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Andrew Morton
On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > ... > > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -329,7 +329,7 @@ static __always_inline enum

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Andrew Morton
On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche wrote: > This patch suppresses the following sparse warning: > > ./include/linux/slab.h:332:43: warning: dubious: x & !y > > ... > > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -329,7 +329,7 @@ static __always_inline enum

[PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
This patch suppresses the following sparse warning: ./include/linux/slab.h:332:43: warning: dubious: x & !y Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") Cc: Vlastimil Babka Cc: Mel Gorman Cc: Christoph Lameter Cc: Roman Gushchin Signed-off-by: Bart Van Assche

[PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-05 Thread Bart Van Assche
This patch suppresses the following sparse warning: ./include/linux/slab.h:332:43: warning: dubious: x & !y Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") Cc: Vlastimil Babka Cc: Mel Gorman Cc: Christoph Lameter Cc: Roman Gushchin Signed-off-by: Bart Van Assche