diff mbox series

of: overlay: fix warning being reported as error in add_changeset_property

Message ID VI1PR0701MB68298749C8133A7D69CFDBBFC9F09@VI1PR0701MB6829.eurprd07.prod.outlook.com
State Changes Requested, archived
Headers show
Series of: overlay: fix warning being reported as error in add_changeset_property | expand

Checks

Context Check Description
robh/checkpatch warning total: 1 errors, 2 warnings, 8 lines checked
robh/patch-applied fail build log

Commit Message

Ankit 16. Kumar (Nokia) Dec. 30, 2022, 8:40 a.m. UTC
The print causes false reporting of the issue which actually is a warning
Fixes: 2fe0e8769df9 ("of: overlay: check prevents multiple fragments touching same property")

Signed-off-by: Ankit Kumar <ankit.16.kumar@nokia.com>
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.30.1

Comments

Frank Rowand Jan. 2, 2023, 2:35 p.m. UTC | #1
On 12/30/22 02:40, Ankit 16. Kumar (Nokia) wrote:
> 
> The print causes false reporting of the issue which actually is a warning

How did you select the commit in this Fixes tag?

> Fixes: 2fe0e8769df9 ("of: overlay: check prevents multiple fragments touching same property")
> 
> Signed-off-by: Ankit Kumar <ankit.16.kumar@nokia.com>
> ---
>  drivers/of/overlay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index ed4e6c144a68..0da39b8461e7 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -358,7 +358,7 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
>  	}
>  
>  	if (!of_node_check_flag(target->np, OF_OVERLAY))
> -		pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
> +		pr_warn("WARNING: memory leak will occur if overlay removed, 
> +property: %pOF/%s\n",
>  		       target->np, new_prop->name);
>  
>  	if (ret) {
> --
> 2.30.1
> 

NACK.  This patch is incorrect.  The reported memory leak is a bug, not a warning.

I'll write up some information about why the memory leak occurs, then reply to this
email with the additional info.

-Frank
Frank Rowand Jan. 10, 2023, 6:23 a.m. UTC | #2
On 1/2/23 08:35, Frank Rowand wrote:
> On 12/30/22 02:40, Ankit 16. Kumar (Nokia) wrote:
>>
>> The print causes false reporting of the issue which actually is a warning
> 
> How did you select the commit in this Fixes tag?
> 
>> Fixes: 2fe0e8769df9 ("of: overlay: check prevents multiple fragments touching same property")
>>
>> Signed-off-by: Ankit Kumar <ankit.16.kumar@nokia.com>
>> ---
>>  drivers/of/overlay.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index ed4e6c144a68..0da39b8461e7 100644
>> --- a/drivers/of/overlay.c
>> +++ b/drivers/of/overlay.c
>> @@ -358,7 +358,7 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
>>  	}
>>  
>>  	if (!of_node_check_flag(target->np, OF_OVERLAY))
>> -		pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
>> +		pr_warn("WARNING: memory leak will occur if overlay removed, 
>> +property: %pOF/%s\n",
>>  		       target->np, new_prop->name);
>>  
>>  	if (ret) {
>> --
>> 2.30.1
>>
> 
> NACK.  This patch is incorrect.  The reported memory leak is a bug, not a warning.
> 
> I'll write up some information about why the memory leak occurs, then reply to this
> email with the additional info.

The additional information is now available at:

   https://elinux.org/Device_Tree_Linux#Object_Lifetime

> 
> -Frank
Frank Rowand Jan. 10, 2023, 6 p.m. UTC | #3
On 1/10/23 00:23, Frank Rowand wrote:
> On 1/2/23 08:35, Frank Rowand wrote:
>> On 12/30/22 02:40, Ankit 16. Kumar (Nokia) wrote:
>>>
>>> The print causes false reporting of the issue which actually is a warning
>>
>> How did you select the commit in this Fixes tag?
>>
>>> Fixes: 2fe0e8769df9 ("of: overlay: check prevents multiple fragments touching same property")
>>>
>>> Signed-off-by: Ankit Kumar <ankit.16.kumar@nokia.com>
>>> ---
>>>  drivers/of/overlay.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index ed4e6c144a68..0da39b8461e7 100644
>>> --- a/drivers/of/overlay.c
>>> +++ b/drivers/of/overlay.c
>>> @@ -358,7 +358,7 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
>>>  	}
>>>  
>>>  	if (!of_node_check_flag(target->np, OF_OVERLAY))
>>> -		pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
>>> +		pr_warn("WARNING: memory leak will occur if overlay removed, 
>>> +property: %pOF/%s\n",
>>>  		       target->np, new_prop->name);
>>>  
>>>  	if (ret) {
>>> --
>>> 2.30.1
>>>
>>
>> NACK.  This patch is incorrect.  The reported memory leak is a bug, not a warning.
>>
>> I'll write up some information about why the memory leak occurs, then reply to this
>> email with the additional info.
> 
> The additional information is now available at:
> 
>    https://elinux.org/Device_Tree_Linux#Object_Lifetime

I have now expanded the information at that link to content that is beyond
the original topic.  Those interested in devicetree memory object may find
the additional info useful.

> 
>>
>> -Frank
>
diff mbox series

Patch

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index ed4e6c144a68..0da39b8461e7 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -358,7 +358,7 @@  static int add_changeset_property(struct overlay_changeset *ovcs,
 	}
 
 	if (!of_node_check_flag(target->np, OF_OVERLAY))
-		pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
+		pr_warn("WARNING: memory leak will occur if overlay removed, 
+property: %pOF/%s\n",
 		       target->np, new_prop->name);
 
 	if (ret) {