devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Lizhi Hou <lizhi.hou@amd.com>
Cc: Max Zhen <max.zhen@amd.com>, Sonal Santan <sonal.santan@amd.com>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Allan Nielsen <allan.nielsen@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	Steen Hegelund <steen.hegelund@microchip.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>,
	kernel test robot <lkp@intel.com>
Subject: [PATCH 1/1] of: unittest: Fix test build on config without CONFIG_OF_ADDRESS
Date: Fri, 27 Oct 2023 12:24:37 +0200	[thread overview]
Message-ID: <20231027102440.677773-1-herve.codina@bootlin.com> (raw)

of_address_to_resource() is not defined if !CONFIG_OF_ADDRESS.

Return early in of_unittest_check_addr() to avoid the
of_address_to_resource() usage.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310271513.8MUErCK4-lkp@intel.com/
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
Rob,

This fixes a patch you already applied from my series
https://lore.kernel.org/all/20231017110221.189299-1-herve.codina@bootlin.com/

I don't know if it's too late or not but maybe you can squash this fix patch.

My apologies for this issue.

Hervé

 drivers/of/unittest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index ffbecd349899..e9e90e96600e 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1201,6 +1201,9 @@ static void __init of_unittest_check_addr(const char *node_path,
 	unsigned int count;
 	int ret;
 
+	if (!IS_ENABLED(CONFIG_OF_ADDRESS))
+		return;
+
 	np = of_find_node_by_path(node_path);
 	if (!np) {
 		pr_err("missing testcase data (%s)\n", node_path);
-- 
2.41.0


             reply	other threads:[~2023-10-27 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 10:24 Herve Codina [this message]
2023-10-27 21:38 ` [PATCH 1/1] of: unittest: Fix test build on config without CONFIG_OF_ADDRESS Rob Herring

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=20231027102440.677773-1-herve.codina@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=allan.nielsen@microchip.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=lkp@intel.com \
    --cc=max.zhen@amd.com \
    --cc=robh+dt@kernel.org \
    --cc=sonal.santan@amd.com \
    --cc=steen.hegelund@microchip.com \
    --cc=stefano.stabellini@xilinx.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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).