devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: unittest: fix an error test in of_unittest_overlay_8()
@ 2018-03-07  6:18 Dan Carpenter
  2018-03-07 19:09 ` Frank Rowand
  2018-03-08  2:13 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-03-07  6:18 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree, kernel-janitors

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] of: unittest: fix an error test in of_unittest_overlay_8()
  2018-03-07  6:18 [PATCH] of: unittest: fix an error test in of_unittest_overlay_8() Dan Carpenter
@ 2018-03-07 19:09 ` Frank Rowand
  2018-03-07 20:13   ` Frank Rowand
  2018-03-08  2:13 ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Frank Rowand @ 2018-03-07 19:09 UTC (permalink / raw)
  To: Dan Carpenter, Rob Herring; +Cc: devicetree, kernel-janitors, Frank Rowand

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] of: unittest: fix an error test in of_unittest_overlay_8()
  2018-03-07 19:09 ` Frank Rowand
@ 2018-03-07 20:13   ` Frank Rowand
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Rowand @ 2018-03-07 20:13 UTC (permalink / raw)
  To: Dan Carpenter, Rob Herring; +Cc: devicetree, kernel-janitors

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] of: unittest: fix an error test in of_unittest_overlay_8()
  2018-03-07  6:18 [PATCH] of: unittest: fix an error test in of_unittest_overlay_8() Dan Carpenter
  2018-03-07 19:09 ` Frank Rowand
@ 2018-03-08  2:13 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-03-08  2:13 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Frank Rowand, devicetree, kernel-janitors

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-08  2:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07  6:18 [PATCH] of: unittest: fix an error test in of_unittest_overlay_8() Dan Carpenter
2018-03-07 19:09 ` Frank Rowand
2018-03-07 20:13   ` Frank Rowand
2018-03-08  2:13 ` Rob Herring

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).