* [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
@ 2012-11-19 5:27 ` Josh Triplett
2012-11-19 5:28 ` [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86 Josh Triplett
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:27 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, Johannes Weiner, David S. Miller,
Tejun Heo, Gavin Shan, Yinghai Lu, linux-mm, linux-kernel
Cc: Josh Triplett
Both mm/bootmem.c and mm/nobootmem.c define an internal function
___alloc_bootmem_node. Nothing outside of those source files references
that function, so declare it static in both cases.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
mm/bootmem.c | 8 +++++---
mm/nobootmem.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 434be4a..93eb8bd 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -747,9 +747,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
}
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
- unsigned long align, unsigned long goal,
- unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+ unsigned long size,
+ unsigned long align,
+ unsigned long goal,
+ unsigned long limit)
{
void *ptr;
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 714d5d6..c4e22a1 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -319,9 +319,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
}
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
- unsigned long align, unsigned long goal,
- unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+ unsigned long size,
+ unsigned long align,
+ unsigned long goal,
+ unsigned long limit)
{
void *ptr;
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
2012-11-19 5:27 ` [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static Josh Triplett
@ 2012-11-19 5:28 ` Josh Triplett
2012-11-19 5:28 ` [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally Josh Triplett
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, David Rientjes, Minchan Kim,
Kautuk Consul, Cong Wang, linux-mm, linux-kernel
Cc: Josh Triplett
Commit 3ee48b6af49cf534ca2f481ecc484b156a41451d added the
set_iounmap_nonlazy function for use on x86, but actually defined it on
all architectures. Only x86 prototypes this function (in asm/io.h), and
only x86 uses it (in arch/x86/kernel/crash_dump_64.c), so avoid defining
it on non-x86.
Meanwhile, include the appropriate header with the prototype, to
eliminate a warning from gcc (-Wmissing-prototypes) and from Sparse
(-Wdecl).
mm/vmalloc.c:563:6: warning: no previous prototype for ‘set_iounmap_nonlazy’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
mm/vmalloc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 78e0830..fc32a0a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -27,6 +27,7 @@
#include <linux/pfn.h>
#include <linux/kmemleak.h>
#include <linux/atomic.h>
+#include <linux/io.h>
#include <asm/uaccess.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
@@ -556,6 +557,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
/* for per-CPU blocks */
static void purge_fragmented_blocks_allcpus(void);
+#ifdef CONFIG_X86
/*
* called before a call to iounmap() if the caller wants vm_area_struct's
* immediately freed.
@@ -564,6 +566,7 @@ void set_iounmap_nonlazy(void)
{
atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
}
+#endif
/*
* Purges all lazily-freed vmap areas.
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
2012-11-19 5:27 ` [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static Josh Triplett
2012-11-19 5:28 ` [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86 Josh Triplett
@ 2012-11-19 5:28 ` Josh Triplett
2012-11-19 5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
Rik van Riel, Hugh Dickins, linux-mm, linux-kernel
Cc: Josh Triplett
mm/internal.h declares vma_address inside an ifdef
CONFIG_TRANSPARENT_HUGEPAGE; however, mm/rmap.c defines the function
unconditionally. Move the function outside of the ifdef.
This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).
mm/rmap.c:527:1: warning: no previous prototype for ‘vma_address’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
mm/internal.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h
index a4fa284..6cd14dc 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -221,10 +221,8 @@ static inline void mlock_migrate_page(struct page *newpage, struct page *page)
}
}
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
extern unsigned long vma_address(struct page *page,
struct vm_area_struct *vma);
-#endif
#else /* !CONFIG_MMU */
static inline int mlocked_vma_newpage(struct vm_area_struct *v, struct page *p)
{
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 29/58] mm: Make copy_pte_range static
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
` (2 preceding siblings ...)
2012-11-19 5:28 ` [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally Josh Triplett
@ 2012-11-19 5:28 ` Josh Triplett
2012-11-19 21:40 ` David Rientjes
2012-11-19 5:28 ` [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static Josh Triplett
2012-11-19 5:28 ` [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed Josh Triplett
5 siblings, 1 reply; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, Josh Triplett, Andrea Arcangeli,
David Rientjes, Naoya Horiguchi, Al Viro, Konstantin Khlebnikov,
linux-kernel, linux-mm
Nothing outside of mm/memory.c references copy_pte_range.
linux/huge_mm.h prototypes it, but nothing uses that prototype. Commit
71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
copy_pte_range non-static, but no commit ever introduced a caller for
copy_pte_range outside of mm/memory.c. Make the function static.
This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).
mm/memory.c:917:5: warning: no previous prototype for ‘copy_pte_range’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
include/linux/huge_mm.h | 4 ----
mm/memory.c | 7 ++++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 8ed2187..e10d4fe 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -87,10 +87,6 @@ extern int handle_pte_fault(struct mm_struct *mm,
#endif /* CONFIG_DEBUG_VM */
extern unsigned long transparent_hugepage_flags;
-extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
- pmd_t *dst_pmd, pmd_t *src_pmd,
- struct vm_area_struct *vma,
- unsigned long addr, unsigned long end);
extern int split_huge_page(struct page *page);
extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
#define split_huge_page_pmd(__mm, __pmd) \
diff --git a/mm/memory.c b/mm/memory.c
index fb135ba..fa106b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -914,9 +914,10 @@ out_set_pte:
return 0;
}
-int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
- pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
- unsigned long addr, unsigned long end)
+static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
+ pmd_t *dst_pmd, pmd_t *src_pmd,
+ struct vm_area_struct *vma,
+ unsigned long addr, unsigned long end)
{
pte_t *orig_src_pte, *orig_dst_pte;
pte_t *src_pte, *dst_pte;
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
` (3 preceding siblings ...)
2012-11-19 5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
@ 2012-11-19 5:28 ` Josh Triplett
2012-11-19 5:28 ` [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed Josh Triplett
5 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
Cc: Josh Triplett
mm/page_alloc.c defines a fallback version of __early_pfn_to_nid for
architectures without CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID. Nothing
outside of mm/page_alloc.c calls that function, so mark it static. This
eliminates warnings from GCC (-Wmissing-prototypes) and Sparse (-Wdecl).
mm/page_alloc.c:4075:118: warning: no previous prototype for ‘__early_pfn_to_nid’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b74de6..d857953 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4072,7 +4072,7 @@ int __meminit init_currently_empty_zone(struct zone *zone,
* was used and there are no special requirements, this is a convenient
* alternative
*/
-int __meminit __early_pfn_to_nid(unsigned long pfn)
+static int __meminit __early_pfn_to_nid(unsigned long pfn)
{
unsigned long start_pfn, end_pfn;
int i, nid;
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
` (4 preceding siblings ...)
2012-11-19 5:28 ` [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static Josh Triplett
@ 2012-11-19 5:28 ` Josh Triplett
5 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2012-11-19 5:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
Cc: Josh Triplett
mm/page_alloc.c defines is_pageblock_removable_nolock unconditionally,
but include/linux/memory_hotplug.h only prototypes it when
CONFIG_MEMORY_HOTPLUG=y and CONFIG_MEMORY_HOTREMOVE=y. Add the
corresponding conditions around the definition, too.
This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).
mm/page_alloc.c:5634:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d857953..706bd5f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5631,6 +5631,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count)
return false;
}
+#if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE)
bool is_pageblock_removable_nolock(struct page *page)
{
struct zone *zone;
@@ -5654,6 +5655,7 @@ bool is_pageblock_removable_nolock(struct page *page)
return !has_unmovable_pages(zone, page, 0);
}
+#endif /* defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE) */
#ifdef CONFIG_CMA
--
1.7.10.4
--
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 29/58] mm: Make copy_pte_range static
2012-11-19 5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
@ 2012-11-19 21:40 ` David Rientjes
0 siblings, 0 replies; 7+ messages in thread
From: David Rientjes @ 2012-11-19 21:40 UTC (permalink / raw)
To: Josh Triplett
Cc: Linus Torvalds, Andrew Morton, Andrea Arcangeli, Naoya Horiguchi,
Al Viro, Konstantin Khlebnikov, linux-kernel, linux-mm
[-- Attachment #1: Type: TEXT/PLAIN, Size: 691 bytes --]
On Sun, 18 Nov 2012, Josh Triplett wrote:
> Nothing outside of mm/memory.c references copy_pte_range.
> linux/huge_mm.h prototypes it, but nothing uses that prototype. Commit
> 71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
> copy_pte_range non-static, but no commit ever introduced a caller for
> copy_pte_range outside of mm/memory.c. Make the function static.
>
> This eliminates a warning from gcc (-Wmissing-prototypes) and from
> Sparse (-Wdecl).
>
> mm/memory.c:917:5: warning: no previous prototype for a??copy_pte_rangea?? [-Wmissing-prototypes]
>
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-19 21:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
2012-11-19 5:27 ` [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static Josh Triplett
2012-11-19 5:28 ` [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86 Josh Triplett
2012-11-19 5:28 ` [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally Josh Triplett
2012-11-19 5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
2012-11-19 21:40 ` David Rientjes
2012-11-19 5:28 ` [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static Josh Triplett
2012-11-19 5:28 ` [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).