mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/2] state: do not complain about missing backend-storage-type
Date: Tue, 23 May 2017 09:46:52 +0200	[thread overview]
Message-ID: <20170523074653.32180-1-s.hauer@pengutronix.de> (raw)

backend-storage-type is irrelevant for mtd devices, so do not
complain about this option missing. The mtd backend will print
messages if necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/state/state.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/common/state/state.c b/common/state/state.c
index 878fd1b0fb..121ba0c6d3 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -571,7 +571,7 @@ struct state *state_new_from_node(struct device_node *node, char *path,
 	struct state *state;
 	int ret = 0;
 	const char *backend_type;
-	const char *storage_type;
+	const char *storage_type = NULL;
 	const char *alias;
 	uint32_t stridesize;
 
@@ -616,12 +616,7 @@ struct state *state_new_from_node(struct device_node *node, char *path,
 		stridesize = 0;
 	}
 
-	ret = of_property_read_string(node, "backend-storage-type",
-				      &storage_type);
-	if (ret) {
-		storage_type = NULL;
-		dev_info(&state->dev, "No backend-storage-type found, using default.\n");
-	}
+	of_property_read_string(node, "backend-storage-type", &storage_type);
 
 	ret = state_format_init(state, backend_type, node, alias);
 	if (ret)
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2017-05-23  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23  7:46 Sascha Hauer [this message]
2017-05-23  7:46 ` [PATCH 2/2] state: Add working example dtsi file 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=20170523074653.32180-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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