mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH 3/7] sandbox: hostfile: don't warn on failed hostfile fixup
Date: Mon, 24 Apr 2023 14:18:01 +0200	[thread overview]
Message-ID: <20230424121805.150434-3-ahmad@a3f.at> (raw)
In-Reply-To: <20230424121805.150434-1-ahmad@a3f.at>

The node is not deleted, so the hostfile driver will probe the node in
any case and error will just be printed twice. Thus drop the checks from
the fixup.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/sandbox/board/hostfile.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index 436a7503befa..424f16acd5fc 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -257,23 +257,14 @@ static int of_hostfile_map_fixup(struct device_node *root, void *ctx)
 
 		ret = linux_open_hostfile(&hf);
 		if (ret)
-			goto out;
+			continue;
 
 		reg[0] = hf.base;
 		reg[1] = hf.size;
 
-		ret = of_property_write_u64_array(node, "reg", reg, ARRAY_SIZE(reg));
-		if (ret)
-			goto out;
-
-		ret = of_property_write_bool(node, "barebox,blockdev", hf.is_blockdev);
-		if (ret)
-			goto out;
-
-		ret = of_property_write_u32(node, "barebox,fd", hf.fd);
-out:
-		if (ret)
-			pr_err("error fixing up %s: %pe\n", hf.devname, ERR_PTR(ret));
+		of_property_write_u64_array(node, "reg", reg, ARRAY_SIZE(reg));
+		of_property_write_bool(node, "barebox,blockdev", hf.is_blockdev);
+		of_property_write_u32(node, "barebox,fd", hf.fd);
 	}
 
 	return 0;
-- 
2.38.4




  parent reply	other threads:[~2023-04-24 12:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 12:17 [PATCH 1/7] sandbox: watchdog: handle missing stickypage gracefully Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 2/7] sandbox: power: " Ahmad Fatoum
2023-04-24 12:18 ` Ahmad Fatoum [this message]
2023-04-24 12:18 ` [PATCH 4/7] treewide: drop trailing space Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 5/7] driver: be explicit about supported #feature-cells Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 6/7] featctrl: drop useless NULL check Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 7/7] sandbox: hostfile: add feature controller support Ahmad Fatoum
2023-05-02  9:34 ` [PATCH 1/7] sandbox: watchdog: handle missing stickypage gracefully Sascha Hauer

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=20230424121805.150434-3-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=barebox@lists.infradead.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