lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e6ff678-9d87-9b01-e247-01c549a18529@redhat.com>
Date:   Fri, 22 Jan 2021 16:38:04 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Baoquan He <bhe@...hat.com>, linux-kernel@...r.kernel.org
Cc:     linux-mm@...ck.org, akpm@...ux-foundation.org, rppt@...nel.org,
        lkp@...el.com
Subject: Re: [PATCH v5 1/5] mm: fix prototype warning from kernel test robot

On 22.01.21 14:59, Baoquan He wrote:
> Kernel test robot calling make with 'W=1' is triggering warning like
> 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@...hat.com>
> Reported-by: kernel test robot <lkp@...el.com>
> ---
>  arch/ia64/include/asm/pgtable.h | 6 ------
>  include/linux/mm.h              | 2 ++
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
> index 779b6972aa84..9b4efe89e62d 100644
> --- a/arch/ia64/include/asm/pgtable.h
> +++ b/arch/ia64/include/asm/pgtable.h
> @@ -517,12 +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 (unsigned long size, int nid, unsigned long zone,
> -			     unsigned long start_pfn);
> -#  endif /* CONFIG_VIRTUAL_MEM_MAP */
>  # endif /* !__ASSEMBLY__ */
>  
>  /*
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 3dac7bc667ee..3d82b4f7cabc 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2401,6 +2401,8 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);
>  extern void memmap_init_zone(unsigned long, int, unsigned long,
>  		unsigned long, unsigned long, enum meminit_context,
>  		struct vmem_altmap *, int migratetype);
> +extern void memmap_init(unsigned long size, int nid,
> +		unsigned long zone, unsigned long range_start_pfn);
>  extern void setup_per_zone_wmarks(void);
>  extern int __meminit init_per_zone_wmark_min(void);
>  extern void mem_init(void);
> 

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ