public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Rob Herring <robherring2@gmail•com>
Cc: Linux-Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>
Subject: Re: linux-next: build warnings after merge of the devicetree tree
Date: Wed, 5 Sep 2018 11:54:11 +1000	[thread overview]
Message-ID: <20180905115411.0c52399c@canb.auug.org.au> (raw)
In-Reply-To: <20180905103906.232545a4@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]

Hi all,

On Wed, 5 Sep 2018 10:39:06 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> After merging the devicetree tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
> 
> WARNING: vmlinux.o(.text+0xf40a16): Section mismatch in reference from the function of_fdt_limit_memory() to the variable .init.data:dt_root_addr_cells
> The function of_fdt_limit_memory() references
> the variable __initdata dt_root_addr_cells.
> This is often because of_fdt_limit_memory lacks a __initdata 
> annotation or the annotation of dt_root_addr_cells is wrong.
> 
> WARNING: vmlinux.o(.text+0xf40a1d): Section mismatch in reference from the function of_fdt_limit_memory() to the variable .init.data:dt_root_size_cells
> The function of_fdt_limit_memory() references
> the variable __initdata dt_root_size_cells.
> This is often because of_fdt_limit_memory lacks a __initdata 
> annotation or the annotation of dt_root_size_cells is wrong.
> 
> Introduced by commit
> 
>   bb35ea5c7c30 ("of/fdt: avoid re-parsing '#{address,size}-cells' in of_fdt_limit_memory")

It turns out that section mismatches are fatal errors in some configs (like powerpc allnoconfig), so I have added the following patch for today:

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Wed, 5 Sep 2018 11:50:29 +1000
Subject: [PATCH] mark of_fdt_limit_memory() as __init

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 drivers/of/fdt.c       | 2 +-
 include/linux/of_fdt.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index fef4b2c8a171..fe78bed8925f 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -39,7 +39,7 @@
  * memory entries in the /memory node. This function may be called
  * any time after initial_boot_param is set.
  */
-void of_fdt_limit_memory(int limit)
+void __init of_fdt_limit_memory(int limit)
 {
 	int memory;
 	int len;
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b9cd9ebdf9b9..19ebf22a7862 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -46,7 +46,7 @@ extern char __dtb_end[];
 
 /* Other Prototypes */
 extern u64 of_flat_dt_translate_address(unsigned long node);
-extern void of_fdt_limit_memory(int limit);
+extern void __init of_fdt_limit_memory(int limit);
 #endif /* CONFIG_OF_FLATTREE */
 
 #ifdef CONFIG_OF_EARLY_FLATTREE
-- 
2.18.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-09-05  1:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05  0:39 linux-next: build warnings after merge of the devicetree tree Stephen Rothwell
2018-09-05  1:54 ` Stephen Rothwell [this message]
2018-09-05 11:20   ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2018-09-20  1:47 Stephen Rothwell
2018-09-20 13:49 ` Rob Herring
2020-03-16  1:11 Stephen Rothwell
2021-03-29  8:53 Stephen Rothwell
2021-03-29  9:48 ` Lee Jones
2022-01-15  4:32 Stephen Rothwell
2022-01-15 11:33 ` Michael Walle
2025-11-18  3:38 Stephen Rothwell
2025-11-28  5:10 ` Stephen Rothwell
2025-11-28 14:54   ` Rob Herring
2025-11-28 22:31     ` Stephen Rothwell
2025-12-16  1:19       ` Stephen Rothwell
2025-12-18 10:15         ` Stephen Rothwell
2025-12-18 13:06           ` Rob Herring
2026-01-05  5:44     ` Stephen Rothwell

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=20180905115411.0c52399c@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=robherring2@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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