From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: nfont@linux.vnet.ibm.com, Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Subject: [PATCH 2/8] powerpc/pseries: fix over writing of rtas return code in update_dt_node
Date: Wed, 14 Aug 2013 22:23:46 -0700 [thread overview]
Message-ID: <1376544232-24936-3-git-send-email-tyreld@linux.vnet.ibm.com> (raw)
In-Reply-To: <1376544232-24936-1-git-send-email-tyreld@linux.vnet.ibm.com>
The rc variable is initially used to store the return code from the
ibm,update-properties rtas call which returns 0 or 1 on success. A return
code of 1 indicates that ibm,update-properties must be called again for the
node. However, the rc variable is overwritten by a call to update_dt_prop
which returns 0 on success. This results in ibm,update-properties not being
called again for the given node when the rtas call rc was previously 1.
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/mobility.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index f28abee..aaae85d 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -130,7 +130,7 @@ static int update_dt_node(u32 phandle, s32 scope)
struct update_props_workarea *upwa;
struct device_node *dn;
struct property *prop = NULL;
- int i, rc;
+ int i, rc, rtas_rc;
char *prop_data;
char *rtas_buf;
int update_properties_token;
@@ -154,9 +154,9 @@ static int update_dt_node(u32 phandle, s32 scope)
upwa->phandle = phandle;
do {
- rc = mobility_rtas_call(update_properties_token, rtas_buf,
+ rtas_rc = mobility_rtas_call(update_properties_token, rtas_buf,
scope);
- if (rc < 0)
+ if (rtas_rc < 0)
break;
prop_data = rtas_buf + sizeof(*upwa);
@@ -202,7 +202,7 @@ static int update_dt_node(u32 phandle, s32 scope)
prop_data += vd;
}
}
- } while (rc == 1);
+ } while (rtas_rc == 1);
of_node_put(dn);
kfree(rtas_buf);
--
1.7.12.4
next prev parent reply other threads:[~2013-08-15 5:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 5:23 [PATCH 0/8] powerpc/pseries: fix/cleanup broken mobility device-tree update code Tyrel Datwyler
2013-08-15 5:23 ` [PATCH 1/8] powerpc/pseries: fix creation of loop in device node property list Tyrel Datwyler
2013-08-19 13:43 ` Nathan Fontenot
2013-08-15 5:23 ` Tyrel Datwyler [this message]
2013-08-19 13:44 ` [PATCH 2/8] powerpc/pseries: fix over writing of rtas return code in update_dt_node Nathan Fontenot
2013-08-15 5:23 ` [PATCH 3/8] powerpc/pseries: pack update_props_workarea to map correctly to rtas buffer header Tyrel Datwyler
2013-08-19 13:46 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 4/8] powerpc/pseries: fix parsing of initial node path in update_dt_node Tyrel Datwyler
2013-08-19 13:48 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 5/8] powerpc/pseries: do all node initialization in dlpar_parse_cc_node Tyrel Datwyler
2013-08-19 13:49 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 6/8] powerpc/pseries: make dlpar_configure_connector parent node aware Tyrel Datwyler
2013-08-19 13:53 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 7/8] powerpc/pseries: add mising of_node_put in delete_dt_node Tyrel Datwyler
2013-08-19 13:54 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 8/8] powerpc/pseries: child nodes are not detached by dlpar_detach_node Tyrel Datwyler
2013-08-19 13:56 ` Nathan Fontenot
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=1376544232-24936-3-git-send-email-tyreld@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nfont@linux.vnet.ibm.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).