Re: [PATCH] mm: use unsigned long constant for page flags

2016-04-29 Thread Andrew Morton
On Fri, 29 Apr 2016 16:15:23 -0700 Yu Zhao wrote: > struct page->flags is unsigned long, so when shifting bits we should > use UL suffix to match it. > > Found this problem after I added 64-bit CPU specific page flags and > failed to compile the kernel: > mm/page_alloc.c:

Re: [PATCH] mm: use unsigned long constant for page flags

2016-04-29 Thread Andrew Morton
On Fri, 29 Apr 2016 16:15:23 -0700 Yu Zhao wrote: > struct page->flags is unsigned long, so when shifting bits we should > use UL suffix to match it. > > Found this problem after I added 64-bit CPU specific page flags and > failed to compile the kernel: > mm/page_alloc.c: In function

[PATCH] mm: use unsigned long constant for page flags

2016-04-29 Thread Yu Zhao
struct page->flags is unsigned long, so when shifting bits we should use UL suffix to match it. Found this problem after I added 64-bit CPU specific page flags and failed to compile the kernel: mm/page_alloc.c: In function '__free_one_page': mm/page_alloc.c:672:2: error: integer overflow in

[PATCH] mm: use unsigned long constant for page flags

2016-04-29 Thread Yu Zhao
struct page->flags is unsigned long, so when shifting bits we should use UL suffix to match it. Found this problem after I added 64-bit CPU specific page flags and failed to compile the kernel: mm/page_alloc.c: In function '__free_one_page': mm/page_alloc.c:672:2: error: integer overflow in