mm: fix prototype warning from kernel test robot
Subsystems (2)
PATCH 1/1 mm: fix prototype warning from kernel test robot
Kernel test robot calling make with 'W=1' triggering warning like below below for memmap_init_zone() function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void __meminit __weak memmap_init_zone(unsigned long size, int nid,
| ^~~~~~~~~~~~~~~~
Fix it by adding the function declaration in include/linux/mm.h. Since memmap_init_zone() has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.
--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)
arch/ia64/include/asm/pgtable.h +0 -5
@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /*
include/linux/mm.h +1 -0
@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );
Signature · 1 line
2.17.2
Quoted 40 lines · Baoquan He
Kernel test robot calling make with 'W=1' triggering warning like below below for
memmap_init_zone()function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void__meminit__weakmemmap_init_zone(unsigned long size, int nid,| ^~~~~~~~~~~~~~~~Fix it by adding the function declaration in
include/linux/mm.h. Sincememmap_init_zone()has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.Signed-off-by Baoquan He <[email protected]>Reported-by kernel test robot <[email protected]>--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)arch/ia64/include/asm/pgtable.h +0
-5@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /* include/linux/mm.h +0
-0
include/linux/mm.h extern void set_dma_reserve(unsigned long new_dma_reserve); · line 2407
Quoted 7 lines
include/linux/mm.h +1
-0@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );
This patch is on top of your other series, no?
In -next, we have
extern void memmap_init_zone(unsigned long, int, unsigned long, ...
In that file, so something is wrong.
Signature · 3 lines
Thanks, David / dhildenb
Quoted 51 lines · David Hildenbrand
Quoted 40 lines · Baoquan He
Kernel test robot calling make with 'W=1' triggering warning like below below for
memmap_init_zone()function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void__meminit__weakmemmap_init_zone(unsigned long size, int nid,| ^~~~~~~~~~~~~~~~Fix it by adding the function declaration in
include/linux/mm.h. Sincememmap_init_zone()has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.Signed-off-by Baoquan He <[email protected]>Reported-by kernel test robot <[email protected]>--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)arch/ia64/include/asm/pgtable.h +0
-5@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /* include/linux/mm.h +0
-0include/linux/mm.h extern void set_dma_reserve(unsigned long new_dma_reserve); · line 2407
Quoted 7 lines
include/linux/mm.h +1
-0@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );This patch is on top of your other series, no?
Quoted 5 lines
In -next, we have
extern void memmap_init_zone(unsigned long, int, unsigned long, ...
In that file, so something is wrong.
Right, this one is based on the memmap_init_xx clean up patchset. I mentioned this the the sub-thread of kernel test robot reporting issues.
Quoted 52 lines · Baoquan He
Quoted 51 lines · David Hildenbrand
Quoted 40 lines · Baoquan He
Kernel test robot calling make with 'W=1' triggering warning like below below for
memmap_init_zone()function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void__meminit__weakmemmap_init_zone(unsigned long size, int nid,| ^~~~~~~~~~~~~~~~Fix it by adding the function declaration in
include/linux/mm.h. Sincememmap_init_zone()has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.Signed-off-by Baoquan He <[email protected]>Reported-by kernel test robot <[email protected]>--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)arch/ia64/include/asm/pgtable.h +0
-5@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /* include/linux/mm.h +0
-0include/linux/mm.h extern void set_dma_reserve(unsigned long new_dma_reserve); · line 2407
Quoted 7 lines
include/linux/mm.h +1
-0@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );This patch is on top of your other series, no?
Quoted 9 lines
Quoted 5 lines
In -next, we have
extern void memmap_init_zone(unsigned long, int, unsigned long, ...
In that file, so something is wrong.
Right, this one is based on the
memmap_init_xxclean up patchset. I mentioned this the the sub-thread of kernel test robot reporting issues.
I think it would make things easier to move that fix to the front and resend the whole (5 patches) series.
Signature · 3 lines
Thanks, David / dhildenb
Quoted 57 lines · David Hildenbrand
Quoted 56 lines · Baoquan He
Quoted 55 lines · David Hildenbrand
Quoted 40 lines · Baoquan He
Kernel test robot calling make with 'W=1' triggering warning like below below for
memmap_init_zone()function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void__meminit__weakmemmap_init_zone(unsigned long size, int nid,| ^~~~~~~~~~~~~~~~Fix it by adding the function declaration in
include/linux/mm.h. Sincememmap_init_zone()has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.Signed-off-by Baoquan He <[email protected]>Reported-by kernel test robot <[email protected]>--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)arch/ia64/include/asm/pgtable.h +0
-5@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /* include/linux/mm.h +0
-0include/linux/mm.h extern void set_dma_reserve(unsigned long new_dma_reserve); · line 2407
Quoted 7 lines
include/linux/mm.h +1
-0@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );This patch is on top of your other series, no?
In -next, we have
extern void memmap_init_zone(unsigned long, int, unsigned long, ...
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
In that file, so something is wrong.
Right, this one is based on the
memmap_init_xxclean up patchset. I mentioned this the the sub-thread of kernel test robot reporting issues.I think it would make things easier to move that fix to the front and resend the whole (5 patches) series.
OK, it's fine to me, will resend a series adding this one in. I also need polish log of this patch. Thanks for looking into this.
Quoted 64 lines · Baoquan He
Quoted 63 lines · David Hildenbrand
Quoted 61 lines · Baoquan He
Quoted 51 lines · David Hildenbrand
Quoted 40 lines · Baoquan He
Kernel test robot calling make with 'W=1' triggering warning like below below for
memmap_init_zone()function.
mm/page_alloc.c:6259:23: warning: no previous prototype for 'memmap_init_zone' [-Wmissing-prototypes]
6259 | void__meminit__weakmemmap_init_zone(unsigned long size, int nid,| ^~~~~~~~~~~~~~~~Fix it by adding the function declaration in
include/linux/mm.h. Sincememmap_init_zone()has a generic version with '__weak', the declaratoin in ia64 header file can be simply removed.Signed-off-by Baoquan He <[email protected]>Reported-by kernel test robot <[email protected]>--- arch/ia64/include/asm/pgtable.h | 5 ----- include/linux/mm.h | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)arch/ia64/include/asm/pgtable.h +0
-5@@ -517,11 +517,6 @@ extern struct page *zero_page_memmap_ptr; __changed; \ })#endif - -# ifdef CONFIG_VIRTUAL_MEM_MAP -/* arch mem_map init routine is needed due to holes in a virtual mem_map */ -extern void memmap_init_zone (struct zone *zone); -# endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ /* include/linux/mm.h +0
-0include/linux/mm.h extern void set_dma_reserve(unsigned long new_dma_reserve); · line 2407
Quoted 7 lines
include/linux/mm.h +1
-0@@ -2401,6 +2401,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);extern void memmap_init_range (unsigned long ,int ,unsigned long ,unsigned long ,unsigned long ,enum meminit_context ,struct vmem_altmap *,int migratetype); +extern void memmap_init_zone (struct zone *zone);extern void setup_per_zone_wmarks (void );extern int __meminit init_per_zone_wmark_min (void );extern void mem_init (void );This patch is on top of your other series, no?
Quoted 5 lines
In -next, we have
extern void memmap_init_zone(unsigned long, int, unsigned long, ...
In that file, so something is wrong.
Right, this one is based on the
memmap_init_xxclean up patchset. I mentioned this the the sub-thread of kernel test robot reporting issues.
Quoted 6 lines
Quoted 2 lines
I think it would make things easier to move that fix to the front and resend the whole (5 patches) series.
OK, it's fine to me, will resend a series adding this one in. I also need polish log of this patch. Thanks for looking into this.
I'll review ASAP once you resend :)
Signature · 3 lines
Thanks, David / dhildenb