linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: fix prototype warning from kernel test robot
@ 2021-01-22  7:03 Baoquan He
  2021-01-22  8:40 ` David Hildenbrand
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2021-01-22  7:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, akpm, rppt, bhe

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.

Signed-off-by: Baoquan He <bhe@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
---
 arch/ia64/include/asm/pgtable.h | 5 -----
 include/linux/mm.h              | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index 2c81394a2430..9b4efe89e62d 100644
--- a/arch/ia64/include/asm/pgtable.h
+++ b/arch/ia64/include/asm/pgtable.h
@@ -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__ */
 
 /*
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 56bb239f9150..073049bd0b29 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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);
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mm: fix prototype warning from kernel test robot
  2021-01-22  7:03 [PATCH] mm: fix prototype warning from kernel test robot Baoquan He
@ 2021-01-22  8:40 ` David Hildenbrand
  2021-01-22  8:46   ` Baoquan He
  0 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2021-01-22  8:40 UTC (permalink / raw)
  To: Baoquan He, linux-kernel; +Cc: linux-mm, akpm, rppt

On 22.01.21 08:03, Baoquan He wrote:
> 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.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
>  arch/ia64/include/asm/pgtable.h | 5 -----
>  include/linux/mm.h              | 1 +
>  2 files changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
> index 2c81394a2430..9b4efe89e62d 100644
> --- a/arch/ia64/include/asm/pgtable.h
> +++ b/arch/ia64/include/asm/pgtable.h
> @@ -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__ */
>  
>  /*
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 56bb239f9150..073049bd0b29 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -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.

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mm: fix prototype warning from kernel test robot
  2021-01-22  8:40 ` David Hildenbrand
@ 2021-01-22  8:46   ` Baoquan He
  2021-01-22  8:55     ` David Hildenbrand
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2021-01-22  8:46 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: linux-kernel, linux-mm, akpm, rppt

On 01/22/21 at 09:40am, David Hildenbrand wrote:
> On 22.01.21 08:03, Baoquan He wrote:
> > 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.
> > 
> > Signed-off-by: Baoquan He <bhe@redhat.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > ---
> >  arch/ia64/include/asm/pgtable.h | 5 -----
> >  include/linux/mm.h              | 1 +
> >  2 files changed, 1 insertion(+), 5 deletions(-)
> > 
> > diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
> > index 2c81394a2430..9b4efe89e62d 100644
> > --- a/arch/ia64/include/asm/pgtable.h
> > +++ b/arch/ia64/include/asm/pgtable.h
> > @@ -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__ */
> >  
> >  /*
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index 56bb239f9150..073049bd0b29 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -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.

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mm: fix prototype warning from kernel test robot
  2021-01-22  8:46   ` Baoquan He
@ 2021-01-22  8:55     ` David Hildenbrand
  2021-01-22  8:58       ` Baoquan He
  0 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2021-01-22  8:55 UTC (permalink / raw)
  To: Baoquan He; +Cc: linux-kernel, linux-mm, akpm, rppt

On 22.01.21 09:46, Baoquan He wrote:
> On 01/22/21 at 09:40am, David Hildenbrand wrote:
>> On 22.01.21 08:03, Baoquan He wrote:
>>> 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.
>>>
>>> Signed-off-by: Baoquan He <bhe@redhat.com>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> ---
>>>  arch/ia64/include/asm/pgtable.h | 5 -----
>>>  include/linux/mm.h              | 1 +
>>>  2 files changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
>>> index 2c81394a2430..9b4efe89e62d 100644
>>> --- a/arch/ia64/include/asm/pgtable.h
>>> +++ b/arch/ia64/include/asm/pgtable.h
>>> @@ -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__ */
>>>  
>>>  /*
>>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>>> index 56bb239f9150..073049bd0b29 100644
>>> --- a/include/linux/mm.h
>>> +++ b/include/linux/mm.h
>>> @@ -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.
> 
> 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.
> 

I think it would make things easier to move that fix to the front and
resend the whole (5 patches) series.

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mm: fix prototype warning from kernel test robot
  2021-01-22  8:55     ` David Hildenbrand
@ 2021-01-22  8:58       ` Baoquan He
  2021-01-22  9:08         ` David Hildenbrand
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2021-01-22  8:58 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: linux-kernel, linux-mm, akpm, rppt

On 01/22/21 at 09:55am, David Hildenbrand wrote:
> On 22.01.21 09:46, Baoquan He wrote:
> > On 01/22/21 at 09:40am, David Hildenbrand wrote:
> >> On 22.01.21 08:03, Baoquan He wrote:
> >>> 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.
> >>>
> >>> Signed-off-by: Baoquan He <bhe@redhat.com>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>> ---
> >>>  arch/ia64/include/asm/pgtable.h | 5 -----
> >>>  include/linux/mm.h              | 1 +
> >>>  2 files changed, 1 insertion(+), 5 deletions(-)
> >>>
> >>> diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
> >>> index 2c81394a2430..9b4efe89e62d 100644
> >>> --- a/arch/ia64/include/asm/pgtable.h
> >>> +++ b/arch/ia64/include/asm/pgtable.h
> >>> @@ -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__ */
> >>>  
> >>>  /*
> >>> diff --git a/include/linux/mm.h b/include/linux/mm.h
> >>> index 56bb239f9150..073049bd0b29 100644
> >>> --- a/include/linux/mm.h
> >>> +++ b/include/linux/mm.h
> >>> @@ -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.
> > 
> > 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.
> > 
> 
> 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mm: fix prototype warning from kernel test robot
  2021-01-22  8:58       ` Baoquan He
@ 2021-01-22  9:08         ` David Hildenbrand
  0 siblings, 0 replies; 6+ messages in thread
From: David Hildenbrand @ 2021-01-22  9:08 UTC (permalink / raw)
  To: Baoquan He; +Cc: linux-kernel, linux-mm, akpm, rppt

On 22.01.21 09:58, Baoquan He wrote:
> On 01/22/21 at 09:55am, David Hildenbrand wrote:
>> On 22.01.21 09:46, Baoquan He wrote:
>>> On 01/22/21 at 09:40am, David Hildenbrand wrote:
>>>> On 22.01.21 08:03, Baoquan He wrote:
>>>>> 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.
>>>>>
>>>>> Signed-off-by: Baoquan He <bhe@redhat.com>
>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>> ---
>>>>>  arch/ia64/include/asm/pgtable.h | 5 -----
>>>>>  include/linux/mm.h              | 1 +
>>>>>  2 files changed, 1 insertion(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
>>>>> index 2c81394a2430..9b4efe89e62d 100644
>>>>> --- a/arch/ia64/include/asm/pgtable.h
>>>>> +++ b/arch/ia64/include/asm/pgtable.h
>>>>> @@ -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__ */
>>>>>  
>>>>>  /*
>>>>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>>>>> index 56bb239f9150..073049bd0b29 100644
>>>>> --- a/include/linux/mm.h
>>>>> +++ b/include/linux/mm.h
>>>>> @@ -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.
>>>
>>> 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.
>>>
>>
>> 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 :)

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-22  9:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22  7:03 [PATCH] mm: fix prototype warning from kernel test robot Baoquan He
2021-01-22  8:40 ` David Hildenbrand
2021-01-22  8:46   ` Baoquan He
2021-01-22  8:55     ` David Hildenbrand
2021-01-22  8:58       ` Baoquan He
2021-01-22  9:08         ` David Hildenbrand

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).