public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "sundar.R" <prosunofficial@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: heikki.krogerus@linux.intel.com, dmitry.baryshkov@linaro.org,
	neil.armstrong@linaro.org, christophe.jaillet@wanadoo.fr,
	u.kleine-koenig@pengutronix.de, skhan@linuxfoundation.org,
	javier.carrasco.cruz@gmail.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH] usb: typec: mux: replace of_node_put() with __free [linux-next]
Date: Fri, 12 Apr 2024 09:17:54 +0530	[thread overview]
Message-ID: <6fbdbdd3-965f-44e7-bd25-0b0c3e9f53f9@gmail.com> (raw)
In-Reply-To: <2024041103-doornail-professor-7c1e@gregkh>

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@inria.fr>
>> Signed-off-by: R SUNDAR <prosunofficial@gmail.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


      reply	other threads:[~2024-04-12  3:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 16:52 [PATCH] usb: typec: mux: replace of_node_put() with __free [linux-next] R SUNDAR
2024-04-10 17:13 ` Dmitry Baryshkov
2024-04-11 12:17 ` Greg KH
2024-04-12  3:47   ` sundar.R [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fbdbdd3-965f-44e7-bd25-0b0c3e9f53f9@gmail.com \
    --to=prosunofficial@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=skhan@linuxfoundation.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox