Re: [mmotm:master 185/397] mm/nommu.c:1193:8: warning: assignment makes pointer from integer without a cast

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

 



On Thu, 27 Nov 2014 14:13:12 +0900 Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> 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@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]