From: Kees Cook <keescook@chromium.org>
To: David Hildenbrand <david@redhat.com>
Cc: Yi Wang <wang.yi59@zte.com.cn>,
akpm@linux-foundation.org, dan.j.williams@intel.com, cai@lca.pw,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
osalvador@suse.de, mhocko@suse.com, rppt@linux.ibm.com,
richardw.yang@linux.intel.com, xue.zhihong@zte.com.cn,
up2wing@gmail.com, wang.liang82@zte.com.cn
Subject: Re: [PATCH] mm: fix -Wmissing-prototypes warnings
Date: Mon, 23 Sep 2019 16:20:19 -0700 [thread overview]
Message-ID: <201909231620.7C39AE91@keescook> (raw)
In-Reply-To: <89532e1d-bc41-ce70-ae3c-d6073e5c3cd4@redhat.com>
On Mon, Sep 09, 2019 at 09:52:40AM +0200, David Hildenbrand wrote:
> On 28.08.19 09:42, Yi Wang wrote:
> > We get two warnings when build kernel W=1:
> > mm/shuffle.c:36:12: warning: no previous prototype for ‘shuffle_show’
> > [-Wmissing-prototypes]
> > mm/sparse.c:220:6: warning: no previous prototype for
> > ‘subsection_mask_set’ [-Wmissing-prototypes]
> >
> > Make the function static to fix this.
> >
> > Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> > ---
> > mm/shuffle.c | 2 +-
> > mm/sparse.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/shuffle.c b/mm/shuffle.c
> > index 3ce1248..b3fe97f 100644
> > --- a/mm/shuffle.c
> > +++ b/mm/shuffle.c
> > @@ -33,7 +33,7 @@ __meminit void page_alloc_shuffle(enum mm_shuffle_ctl ctl)
> > }
> >
> > static bool shuffle_param;
> > -extern int shuffle_show(char *buffer, const struct kernel_param *kp)
> > +static int shuffle_show(char *buffer, const struct kernel_param *kp)
> > {
> > return sprintf(buffer, "%c\n", test_bit(SHUFFLE_ENABLE, &shuffle_state)
> > ? 'Y' : 'N');
> > diff --git a/mm/sparse.c b/mm/sparse.c
> > index 72f010d..49006dd 100644
> > --- a/mm/sparse.c
> > +++ b/mm/sparse.c
> > @@ -217,7 +217,7 @@ static inline unsigned long first_present_section_nr(void)
> > return next_present_section_nr(-1);
> > }
> >
> > -void subsection_mask_set(unsigned long *map, unsigned long pfn,
> > +static void subsection_mask_set(unsigned long *map, unsigned long pfn,
> > unsigned long nr_pages)
> > {
> > int idx = subsection_map_index(pfn);
> >
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Andrew, can you take this?
--
Kees Cook
prev parent reply other threads:[~2019-09-23 23:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 7:42 Yi Wang
2019-09-09 0:47 ` wang.yi59
2019-09-09 7:52 ` [PATCH] " David Hildenbrand
2019-09-23 23:20 ` Kees Cook [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=201909231620.7C39AE91@keescook \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=richardw.yang@linux.intel.com \
--cc=rppt@linux.ibm.com \
--cc=up2wing@gmail.com \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/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