From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] state: remove unused variables
Date: Thu, 11 May 2017 10:10:03 +0200 [thread overview]
Message-ID: <20170511081003.18988-1-s.hauer@pengutronix.de> (raw)
There's no need to check for the existence of the backend property as
this is done implicitly later anyway. With this check removed of_path
is only assigned, but never used. Remove the unused code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/state/state.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/common/state/state.c b/common/state/state.c
index b4a634fa99..878fd1b0fb 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -570,10 +570,8 @@ struct state *state_new_from_node(struct device_node *node, char *path,
{
struct state *state;
int ret = 0;
- int len;
const char *backend_type;
const char *storage_type;
- const char *of_path;
const char *alias;
uint32_t stridesize;
@@ -587,12 +585,6 @@ struct state *state_new_from_node(struct device_node *node, char *path,
if (IS_ERR(state))
return state;
- of_path = of_get_property(node, "backend", &len);
- if (!of_path) {
- ret = -ENODEV;
- goto out_release_state;
- }
-
if (!path) {
struct device_node *partition_node;
@@ -603,7 +595,6 @@ struct state *state_new_from_node(struct device_node *node, char *path,
goto out_release_state;
}
- of_path = partition_node->full_name;
ret = of_find_path_by_node(partition_node, &path, 0);
if (ret) {
if (ret != -EPROBE_DEFER)
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2017-05-11 8:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170511081003.18988-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