[PATCH 2/3] mm: move two private functions to static linkage

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

 



follow_page_context() and __thp_get_unmapped_area() have no public
declarations and are only used in the files that define them (mm/gup.c
and mm/huge_memory.c, respectively).

This change also appeases GCC if run with -Wmissing-prototypes.

Signed-off-by: Adeodato Simó <dato@xxxxxxxxxxxxxx>
---
 mm/gup.c         | 6 +++---
 mm/huge_memory.c | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/mm/gup.c b/mm/gup.c
index 6dd33e16a806..86a10a9b0344 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -399,9 +399,9 @@ static struct page *follow_p4d_mask(struct vm_area_struct *vma,
  * an error pointer if there is a mapping to something not represented
  * by a page descriptor (see also vm_normal_page()).
  */
-struct page *follow_page_mask(struct vm_area_struct *vma,
-			      unsigned long address, unsigned int flags,
-			      struct follow_page_context *ctx)
+static struct page *follow_page_mask(struct vm_area_struct *vma,
+				     unsigned long address, unsigned int flags,
+				     struct follow_page_context *ctx)
 {
 	pgd_t *pgd;
 	struct page *page;
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2dba2c1c299a..45c1ff36baf1 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -499,8 +499,9 @@ void prep_transhuge_page(struct page *page)
 	set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR);
 }
 
-unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
-		loff_t off, unsigned long flags, unsigned long size)
+static unsigned long __thp_get_unmapped_area(struct file *filp,
+		unsigned long len, loff_t off, unsigned long flags,
+		unsigned long size)
 {
 	unsigned long addr;
 	loff_t off_end = off + len;
-- 
2.19.2




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux