+ mm-fix-wmissing-prototypes-warnings.patch added to -mm tree

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

 



The patch titled
     Subject: mm: fix -Wmissing-prototypes warnings
has been added to the -mm tree.  Its filename is
     mm-fix-wmissing-prototypes-warnings.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-wmissing-prototypes-warnings.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-wmissing-prototypes-warnings.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yi Wang <wang.yi59@xxxxxxxxxx>
Subject: mm: fix -Wmissing-prototypes warnings

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.

Link: http://lkml.kernel.org/r/1566978161-7293-1-git-send-email-wang.yi59@xxxxxxxxxx
Signed-off-by: Yi Wang <wang.yi59@xxxxxxxxxx>
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/shuffle.c |    2 +-
 mm/sparse.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/mm/shuffle.c~mm-fix-wmissing-prototypes-warnings
+++ a/mm/shuffle.c
@@ -33,7 +33,7 @@ __meminit void page_alloc_shuffle(enum m
 }
 
 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');
--- a/mm/sparse.c~mm-fix-wmissing-prototypes-warnings
+++ a/mm/sparse.c
@@ -219,7 +219,7 @@ static inline unsigned long first_presen
 	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);
_

Patches currently in -mm which might be from wang.yi59@xxxxxxxxxx are

mm-oom_killc-fox-oom_cpuset_eligible-comment.patch
mm-fix-wmissing-prototypes-warnings.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux