Message ID | 1376544232-24936-3-git-send-email-tyreld@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 638a405fb52cfb2e7f559e869dd0291420b9e84d |
Headers | show |
On 08/15/2013 12:23 AM, Tyrel Datwyler wrote: > 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> Acked-by: Nathan Fontenot <nfont@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); >
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);
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(-)