On Mon, Dec 01, 2014 at 03:08:51PM -0800, Andrew Morton wrote: > 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); > } > Hello, I think that changing return type of __get_free_pages() is better than introducing new interface. With it, we only need to fix 268 - 172 = 96 callsites. And, get_zeroed_page() should also be fixed. Almost every caller of this function do typecast. :) I'm not familiar with this kind of massive change so it'd be better to be done it by another developer. Thanks. -- 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>