Re: [next:master 7235/7555] mm/page_alloc.c:654:121: warning: comparison of distinct pointer types lacks a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 29 May 2015 13:32:52 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Sat, 30 May 2015 01:48:20 +0800 kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:
> 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   7732a9817fb01002bde7615066e86c156fb5a31b
> > commit: 0491d0d6aac97c5b8df17851db525f3758de26e6 [7235/7555] s390/mm: make hugepages_supported a boot time decision
> > config: s390-defconfig (attached as .config)
> > reproduce:
> >   wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> >   chmod +x ~/bin/make.cross
> >   git checkout 0491d0d6aac97c5b8df17851db525f3758de26e6
> >   # save the attached .config to linux build tree
> >   make.cross ARCH=s390 
> > 
> > All warnings:
> > 
> >    mm/page_alloc.c: In function '__free_one_page':
> > >> mm/page_alloc.c:654:121: warning: comparison of distinct pointer types lacks a cast
> >       max_order = min(MAX_ORDER, pageblock_order + 1);
> >                                                                                                                             ^
> > --
> >    mm/cma.c: In function 'cma_init_reserved_mem':
> > >> mm/cma.c:186:137: warning: comparison of distinct pointer types lacks a cast
> >      alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
> 
> Dominik's patch has somehow managed to change the type of
> pageblock_order.  Before the patch, pageblock_order expands to "(20 -
> 12)".  After the patch, pageblock_order expands to "(HPAGE_SHIFT -
> 12)".
> 
> And on s390, HPAGE_SHIFT is unsigned int.  On x86 HPAGE_SHIFT has type
> int.  I suggest the fix here is to make s390's HPAGE_SHIFT have type
> int as well.

Thanks for noticing. As my way to handle this was mostly inspired by the
way powerpc does it,  I'm kind of puzzled why they don't have the same problem?

So I checked and your fix seems to be the right thing to do. But then I would
assume the powerpc type for HPAGE should also be changed?

Thanks,
	Dominik

> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]