linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dominik Dingel <dingel@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <fengguang.wu@intel.com>,
	kbuild-all@01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [next:master 7235/7555] mm/page_alloc.c:654:121: warning: comparison of distinct pointer types lacks a cast
Date: Sun, 31 May 2015 12:18:15 +0200	[thread overview]
Message-ID: <20150531121815.254f9bc2@BR9TG4T3.de.ibm.com> (raw)
In-Reply-To: <20150529133252.b0fa852381a501ff9df2ffdc@linux-foundation.org>

On Fri, 29 May 2015 13:32:52 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Sat, 30 May 2015 01:48:20 +0800 kbuild test robot <fengguang.wu@intel.com> 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@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 

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

  reply	other threads:[~2015-05-31 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 17:48 kbuild test robot
2015-05-29 20:32 ` Andrew Morton
2015-05-31 10:18   ` Dominik Dingel [this message]
2015-06-01 21:11     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150531121815.254f9bc2@BR9TG4T3.de.ibm.com \
    --to=dingel@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox