devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frowand.list@gmail.com
To: Rob Herring <robh+dt@kernel.org>,
	pantelis.antoniou@konsulko.com,
	Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	geert@linux-m68k.org
Subject: [PATCH] of: Kconfig: OF_OVERLAY, select OF_EARLY_FLATTREE
Date: Sun, 18 Feb 2018 16:29:16 -0800	[thread overview]
Message-ID: <1519000156-14319-1-git-send-email-frowand.list@gmail.com> (raw)

From: Frank Rowand <frank.rowand@sony.com>

kbuild test robot reported a new warning for a recent patch:
>> drivers/of/overlay.c:832:2: error: implicit declaration of function 'of_fdt_unflatten_tree' [-Werror=implicit-function-declaration]
     of_fdt_unflatten_tree(new_fdt, NULL, &overlay_root);

The cause is that the prototype for of_fdt_unflatten_tree() in
include/linux/of_fdt.c is guarded by OF_EARLY_FLATTREE.

This was a pre-existing problem for any overlay related caller of
of_fdt_unflatten_device_tree(), who was then going to pass the
unflattened tree to of_overlay_apply().  After the patch that triggered
this warning, all other overlay callers of of_fdt_unflatten_device_tree()
no longer exist, so adding the select to OF_OVERLAY is a sufficient fix.

To reproduce the warning:
  Use the .config attached to https://lkml.org/lkml/2018/2/17/268
  make ARCH=i386 olddefconfig
  make ARCH=i386 CC=gcc-7 drivers/of/overlay.o

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
---
 drivers/of/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index 783e0870bd22..00a6abfaaec7 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -92,6 +92,7 @@ config OF_RESOLVE
 config OF_OVERLAY
 	bool "Device Tree overlays"
 	select OF_DYNAMIC
+	select OF_EARLY_FLATTREE
 	select OF_RESOLVE
 	help
 	  Overlays are a method to dynamically modify part of the kernel's
-- 
Frank Rowand <frank.rowand@sony.com>

             reply	other threads:[~2018-02-19  0:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19  0:29 frowand.list [this message]
2018-02-19  1:46 ` [PATCH] of: Kconfig: OF_OVERLAY, select OF_EARLY_FLATTREE Rob Herring
2018-02-19  6:24   ` Frank Rowand
2018-02-28 20:26     ` Rob Herring
2018-02-28 21:44       ` Frank Rowand
2018-03-01 16:14         ` Frank Rowand

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=1519000156-14319-1-git-send-email-frowand.list@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=panto@antoniou-consulting.com \
    --cc=robh+dt@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).