linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>,
	kbuild-all@01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [next:master 7235/7555] mm/page_alloc.c:654:121: warning: comparison of distinct pointer types lacks a cast
Date: Fri, 29 May 2015 13:32:52 -0700	[thread overview]
Message-ID: <20150529133252.b0fa852381a501ff9df2ffdc@linux-foundation.org> (raw)
In-Reply-To: <201505300112.mcr8MSyM%fengguang.wu@intel.com>

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.

--
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-29 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 17:48 [next:master 7235/7555] mm/page_alloc.c:654:121: warning: comparison of distinct pointer types lacks a cast kbuild test robot
2015-05-29 20:32 ` Andrew Morton [this message]
2015-05-31 10:18   ` Dominik Dingel
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=20150529133252.b0fa852381a501ff9df2ffdc@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dingel@linux.vnet.ibm.com \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).