devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Frank Rowand <frank.rowand@sony.com>,
	Sasha Levin <sashal@kernel.org>,
	devicetree@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 025/258] of: overlay: do not duplicate properties from overlay for new nodes
Date: Mon, 28 Jan 2019 10:55:31 -0500	[thread overview]
Message-ID: <20190128155924.51521-25-sashal@kernel.org> (raw)
In-Reply-To: <20190128155924.51521-1-sashal@kernel.org>

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

[ Upstream commit 8814dc46bd9e347d4de55ec5bf8f16ea54470499 ]

When allocating a new node, add_changeset_node() was duplicating the
properties from the respective node in the overlay instead of
allocating a node with no properties.

When this patch is applied the errors reported by the devictree
unittest from patch "of: overlay: add tests to validate kfrees from
overlay removal" will no longer occur.  These error messages are of
the form:

   "OF: ERROR: ..."

and the unittest results will change from:

   ### dt-test ### end of unittest - 203 passed, 7 failed

to

   ### dt-test ### end of unittest - 210 passed, 0 failed

Tested-by: Alan Tull <atull@kernel.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index baa9cee6fa2c..4b834518596f 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -368,7 +368,7 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
 			break;
 
 	if (!tchild) {
-		tchild = __of_node_dup(node, node_kbasename);
+		tchild = __of_node_dup(NULL, node_kbasename);
 		if (!tchild)
 			return -ENOMEM;
 
-- 
2.19.1

       reply	other threads:[~2019-01-28 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190128155924.51521-1-sashal@kernel.org>
2019-01-28 15:55 ` Sasha Levin [this message]
2019-01-28 15:55 ` [PATCH AUTOSEL 4.19 031/258] MIPS: Boston: Disable EG20T prefetch Sasha Levin
2019-01-28 15:56 ` [PATCH AUTOSEL 4.19 093/258] ARM: dts: mmp2: fix TWSI2 Sasha Levin
2019-01-28 15:56 ` [PATCH AUTOSEL 4.19 096/258] ARM: dts: aspeed: add missing memory unit-address Sasha Levin
2019-01-28 15:56 ` [PATCH AUTOSEL 4.19 101/258] xtensa: xtfpga.dtsi: fix dtc warnings about SPI Sasha Levin
2019-01-28 15:57 ` [PATCH AUTOSEL 4.19 119/258] ARM: dts: Fix OMAP4430 SDP Ethernet startup Sasha Levin
2019-01-28 15:57 ` [PATCH AUTOSEL 4.19 122/258] ARM: dts: Fix up the D-Link DIR-685 MTD partition info Sasha Levin
2019-01-28 15:57 ` [PATCH AUTOSEL 4.19 126/258] ARM: dts: imx51-zii-rdu1: Do not specify "power-gpio" for hpa1 Sasha Levin

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=20190128155924.51521-25-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frank.rowand@sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.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).