LKML Archive on
 help / color / Atom feed
From: Arnd Bergmann <>
To: Russell King <>
Cc: Arnd Bergmann <>, Mike Rapoport <>,
	Ard Biesheuvel <>,
	Linus Walleij <>,
	Andrew Morton <>,
	Changbin Du <>,,
Subject: [PATCH] [v2] ARM: mark prepare_page_table as __init
Date: Wed, 12 May 2021 11:00:42 +0200
Message-ID: <> (raw)

From: Arnd Bergmann <>

In some configurations when building with gcc-11, prepare_page_table
does not get inline, which causes a build time warning for a section

WARNING: modpost: vmlinux.o(.text.unlikely+0xce8): Section mismatch in reference from the function prepare_page_table() to the (unknown reference)
The function prepare_page_table() references
the (unknown reference) __initdata (unknown).
This is often because prepare_page_table lacks a __initdata
annotation or the annotation of (unknown) is wrong.

Mark the function as __init to avoid the warning regardless of the
inlining, and remove the 'inline' keyword. The compiler is
free to ignore the 'inline' here and it doesn't result in better
object code or more readable source.

Signed-off-by: Arnd Bergmann <>
v2: remove 'inline', as suggested by Russell and Ard
 arch/arm/mm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 051f4f82414b..40a1fa5ec93b 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1246,7 +1246,7 @@ void __init adjust_lowmem_bounds(void)
-static inline void prepare_page_table(void)
+static __init void prepare_page_table(void)
 	unsigned long addr;
 	phys_addr_t end;

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  9:00 Arnd Bergmann [this message]
2021-05-12 12:37 ` Ard Biesheuvel
2021-05-19 23:47 ` Linus Walleij

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone