From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <fengguang.wu@intel.com>,
kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.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, 4 Dec 2014 16:20:30 +0900 [thread overview]
Message-ID: <20141204072030.GC12141@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <20141201150851.019d6a8aeaf269af3f94354a@linux-foundation.org>
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@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);
> }
>
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@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>
prev parent reply other threads:[~2014-12-04 7:17 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
2014-12-01 23:08 ` Andrew Morton
2014-12-04 7:20 ` Joonsoo Kim [this message]
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=20141204072030.GC12141@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