lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 12 Apr 2024 09:17:54 +0530
From: "sundar.R" <prosunofficial@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: heikki.krogerus@...ux.intel.com, dmitry.baryshkov@...aro.org,
 neil.armstrong@...aro.org, christophe.jaillet@...adoo.fr,
 u.kleine-koenig@...gutronix.de, skhan@...uxfoundation.org,
 javier.carrasco.cruz@...il.com, linux-usb@...r.kernel.org,
 linux-kernel@...r.kernel.org, Julia Lawall <julia.lawall@...ia.fr>
Subject: Re: [PATCH] usb: typec: mux: replace of_node_put() with __free
 [linux-next]

Hi greg k-h,

Thanks for comments provided.

On 11/04/24 17:47, Greg KH wrote:
> On Wed, Apr 10, 2024 at 10:22:22PM +0530, R SUNDAR wrote:
>> use the new cleanup magic to replace of_node_put() with
>> __free(device_node) marking to auto release and to simplify the error
>> paths.
>>
>> Suggested-by: Julia Lawall <julia.lawall@...ia.fr>
>> Signed-off-by: R SUNDAR <prosunofficial@...il.com>
> 
> All CAPS for your name?  Is that how it is written on documents (for
> some countries this is normal, but usually not, so I have to ask.)

In documents it was like that.I also thought to change to small letters 
in git user name.
will change to small letter.

>> -
>> -	ep = of_graph_get_endpoint_by_regs(nb7->client->dev.of_node, 1, 0);
>> +	struct device_node *ep __free(device_node) =
> 
> And if so, why this random USB driver being the first one?  Have you
> tested this?

I haven't tested it.I picked this usb driver to get cleanup module 
changes with __free.
I believe since of_node_put() is scope based here,we can use cleanup to 
remove the goto label uses in case of error.
> >
>> +		of_graph_get_endpoint_by_regs(nb7->client->dev.of_node, 1, 0);
>>   
>>   	if (ep) {
> 
>  the "common" path should not be indented, but only the exception (i.e. bail
> if ep is not allocated properly.)
I Tried in same line initialization, it exceeds column limit.
so indented in next line.


> 
> thanks,
> 
> greg k-h

Regards,
Sundar


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ