From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, rppt@kernel.org,
david@redhat.com, bhe@redhat.com, lkp@intel.com
Subject: [PATCH v5 1/5] mm: fix prototype warning from kernel test robot
Date: Fri, 22 Jan 2021 21:59:52 +0800 [thread overview]
Message-ID: <20210122135956.5946-2-bhe@redhat.com> (raw)
In-Reply-To: <20210122135956.5946-1-bhe@redhat.com>
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@redhat.com>
Reported-by: kernel test robot <lkp@intel.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);
--
2.17.2
next prev parent reply other threads:[~2021-01-22 14:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 13:59 [PATCH v5 0/5] mm: clean up names and parameters of memmap_init_xxxx functions Baoquan He
2021-01-22 13:59 ` Baoquan He [this message]
2021-01-22 15:38 ` [PATCH v5 1/5] mm: fix prototype warning from kernel test robot David Hildenbrand
2021-01-22 13:59 ` [PATCH v5 2/5] mm: rename memmap_init() and memmap_init_zone() Baoquan He
2021-01-22 15:38 ` David Hildenbrand
2021-01-22 13:59 ` [PATCH v5 3/5] mm: simplify parater of function memmap_init_zone() Baoquan He
2021-01-22 15:39 ` David Hildenbrand
2021-01-22 13:59 ` [PATCH v5 4/5] mm: simplify parameter of setup_usemap() Baoquan He
2021-01-22 13:59 ` [PATCH v5 5/5] mm: remove unneeded local variable in free_area_init_core Baoquan He
2021-01-22 18:12 ` [PATCH v5 0/5] mm: clean up names and parameters of memmap_init_xxxx functions Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210122135956.5946-2-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).