Re: [mmotm:master 185/397] mm/nommu.c:1193:8: warning: assignment
makes pointer from integer without a cast
[Posted December 3, 2014 by corbet]
From: |
| Andrew Morton <akpm-AT-linux-foundation.org> |
To: |
| Joonsoo Kim <iamjoonsoo.kim-AT-lge.com> |
Subject: |
| Re: [mmotm:master 185/397] mm/nommu.c:1193:8: warning: assignment makes pointer from integer without a cast |
Date: |
| Mon, 1 Dec 2014 15:08:51 -0800 |
Message-ID: |
| <20141201150851.019d6a8aeaf269af3f94354a@linux-foundation.org> |
Cc: |
| kbuild test robot <fengguang.wu-AT-intel.com>, kbuild-all-AT-01.org, Johannes Weiner <hannes-AT-cmpxchg.org>, Linux Memory Management List <linux-mm-AT-kvack.org> |
Archive‑link: | |
Article |
On Thu, 27 Nov 2014 14:13:12 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
> @@ -1190,7 +1190,7 @@ static int do_mmap_private(struct vm_area_struct *vma,
> kdebug("try to alloc exact %lu pages", total);
> base = alloc_pages_exact(len, GFP_KERNEL);
> } else {
> - base = __get_free_pages(GFP_KERNEL, order);
> + base = (void *)__get_free_pages(GFP_KERNEL, order);
> }
__get_free_pages() is so irritating. I'm counting 268 calls, at least
172 of which have to typecast the return value.
static inline void *
someone_think_of_a_name_for_this(gfp_t gfp_mask, unsigned int order)
{
return (void *)__get_free_pages(gfp, order);
}
--
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>