[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201909231620.7C39AE91@keescook>
Date: Mon, 23 Sep 2019 16:20:19 -0700
From: Kees Cook <keescook@...omium.org>
To: David Hildenbrand <david@...hat.com>
Cc: Yi Wang <wang.yi59@....com.cn>, akpm@...ux-foundation.org,
dan.j.williams@...el.com, cai@....pw, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, osalvador@...e.de, mhocko@...e.com,
rppt@...ux.ibm.com, richardw.yang@...ux.intel.com,
xue.zhihong@....com.cn, up2wing@...il.com, wang.liang82@....com.cn
Subject: Re: [PATCH] mm: fix -Wmissing-prototypes warnings
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@....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@...hat.com>
Reviewed-by: Kees Cook <keescook@...omium.org>
Andrew, can you take this?
--
Kees Cook
Powered by blists - more mailing lists