On Tue, Sep 28, 2010 at 02:32:39PM -0700, Andrew Morton wrote: > > +#define ZT_SHIFT(gfp) ((__force int) (gfp) * ZONES_SHIFT) > > #define GFP_ZONE_TABLE ( \ > > - (ZONE_NORMAL << 0 * ZONES_SHIFT) \ > > - | (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \ > > - | (OPT_ZONE_HIGHMEM << __GFP_HIGHMEM * ZONES_SHIFT) \ > > - | (OPT_ZONE_DMA32 << __GFP_DMA32 * ZONES_SHIFT) \ > > - | (ZONE_NORMAL << __GFP_MOVABLE * ZONES_SHIFT) \ > > - | (OPT_ZONE_DMA << (__GFP_MOVABLE | __GFP_DMA) * ZONES_SHIFT) \ > > - | (ZONE_MOVABLE << (__GFP_MOVABLE | __GFP_HIGHMEM) * ZONES_SHIFT)\ > > - | (OPT_ZONE_DMA32 << (__GFP_MOVABLE | __GFP_DMA32) * ZONES_SHIFT)\ > > + (ZONE_NORMAL << ZT_SHIFT(0)) \ > > + | (OPT_ZONE_DMA << ZT_SHIFT(__GFP_DMA)) \ > > + | (OPT_ZONE_HIGHMEM << ZT_SHIFT(__GFP_HIGHMEM)) \ > > + | (OPT_ZONE_DMA32 << ZT_SHIFT(__GFP_DMA32)) \ > > + | (ZONE_NORMAL << ZT_SHIFT(__GFP_MOVABLE)) \ > > + | (OPT_ZONE_DMA << ZT_SHIFT(__GFP_MOVABLE | __GFP_DMA)) \ > > + | (ZONE_MOVABLE << ZT_SHIFT(__GFP_MOVABLE | __GFP_HIGHMEM)) \ > > + | (OPT_ZONE_DMA32 << ZT_SHIFT(__GFP_MOVABLE | __GFP_DMA32)) \ > > ) > > hm. I hope these sparse warnings are sufficiently useful to justify > all the gunk we're adding to support them. > > Is it actually finding any bugs? FWIW, bitwise or done in the right-hand argumet of shift looks ugly as hell; what the hell is that code _doing_? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>