Message ID | 20180307061808.GA15765@mwanda |
---|---|
State | Accepted, archived |
Headers | show |
Series | of: unittest: fix an error test in of_unittest_overlay_8() | expand |
On 03/06/18 22:18, Dan Carpenter wrote: > We changed this from of_overlay_apply() to overlay_data_apply(). The > overlay_data_apply() function returns 1 on success and 0 on error so > the check for less than zero needs to be updated. > > Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c > index ca5e86dadae2..b233f170b2ec 100644 > --- a/drivers/of/unittest.c > +++ b/drivers/of/unittest.c > @@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void) > > overlay_name = overlay_name_from_nr(overlay_nr + i); > > - ret = overlay_data_apply(overlay_name, &ovcs_id); > - if (ret < 0) { > + if (!overlay_data_apply(overlay_name, &ovcs_id)) { > unittest(0, "could not apply overlay \"%s\"\n", > overlay_name); > return; > Thank you. Reviewed-by: Frank Rowand <frank.rowand@sony.com> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 03/07/18 11:09, Frank Rowand wrote: > On 03/06/18 22:18, Dan Carpenter wrote: >> We changed this from of_overlay_apply() to overlay_data_apply(). The >> overlay_data_apply() function returns 1 on success and 0 on error so >> the check for less than zero needs to be updated. >> >> Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") >> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> >> >> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c >> index ca5e86dadae2..b233f170b2ec 100644 >> --- a/drivers/of/unittest.c >> +++ b/drivers/of/unittest.c >> @@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void) >> >> overlay_name = overlay_name_from_nr(overlay_nr + i); >> >> - ret = overlay_data_apply(overlay_name, &ovcs_id); >> - if (ret < 0) { >> + if (!overlay_data_apply(overlay_name, &ovcs_id)) { >> unittest(0, "could not apply overlay \"%s\"\n", >> overlay_name); >> return; >> > > Thank you. > > Reviewed-by: Frank Rowand <frank.rowand@sony.com> sony.com is valid, but that should have been: Reviewed-by: Frank Rowand <frowand.list@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Mar 07, 2018 at 09:18:08AM +0300, Dan Carpenter wrote: > We changed this from of_overlay_apply() to overlay_data_apply(). The > overlay_data_apply() function returns 1 on success and 0 on error so > the check for less than zero needs to be updated. > > Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Applied, thanks. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index ca5e86dadae2..b233f170b2ec 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void) overlay_name = overlay_name_from_nr(overlay_nr + i); - ret = overlay_data_apply(overlay_name, &ovcs_id); - if (ret < 0) { + if (!overlay_data_apply(overlay_name, &ovcs_id)) { unittest(0, "could not apply overlay \"%s\"\n", overlay_name); return;
We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated. Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html