linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [mmotm:master 185/397] mm/nommu.c:1193:8: warning: assignment makes pointer from integer without a cast
Date: Thu, 27 Nov 2014 14:13:12 +0900	[thread overview]
Message-ID: <20141127051311.GB6755@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <201411270833.w1auTAKD%fengguang.wu@intel.com>

On Thu, Nov 27, 2014 at 08:20:35AM +0800, kbuild test robot wrote:
> tree:   git://git.cmpxchg.org/linux-mmotm.git master
> head:   a2d887dee78e23dc092ff14ae2ad22592437a328
> commit: cd4687a1102a69d9045d09e0af6bb9bacfb49ee5 [185/397] mm/nommu: use alloc_pages_exact() rather than it's own implementation
> config: m32r-m32104ut_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 cd4687a1102a69d9045d09e0af6bb9bacfb49ee5
>   # save the attached .config to linux build tree
>   make.cross ARCH=m32r 
> 
> All warnings:
> 
>    mm/nommu.c: In function 'do_mmap_private':
> >> mm/nommu.c:1193:8: warning: assignment makes pointer from integer without a cast
>       base = __get_free_pages(GFP_KERNEL, order);
>            ^
> 
> vim +1193 mm/nommu.c
> 
>   1177		/* allocate some memory to hold the mapping
>   1178		 * - note that this may not return a page-aligned address if the object
>   1179		 *   we're allocating is smaller than a page
>   1180		 */
>   1181		order = get_order(len);
>   1182		kdebug("alloc order %d for %lx", order, len);
>   1183	
>   1184		total = 1 << order;
>   1185		point = len >> PAGE_SHIFT;
>   1186	
>   1187		/* we don't want to allocate a power-of-2 sized page set */
>   1188		if (sysctl_nr_trim_pages && total - point >= sysctl_nr_trim_pages) {
>   1189			total = point;
>   1190			kdebug("try to alloc exact %lu pages", total);
>   1191			base = alloc_pages_exact(len, GFP_KERNEL);
>   1192		} else {
> > 1193			base = __get_free_pages(GFP_KERNEL, order);
>   1194		}

This will fix the warning.
Thanks.

----------->8-------------------

  reply	other threads:[~2014-11-27  5:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  0:20 kbuild test robot
2014-11-27  5:13 ` Joonsoo Kim [this message]
2014-12-01 23:08   ` Andrew Morton
2014-12-04  7:20     ` Joonsoo Kim

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=20141127051311.GB6755@js1304-P5Q-DELUXE \
    --to=iamjoonsoo.kim@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --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