All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Cc: R Sundar <prosunofficial@gmail.com>,
	sylvain.petinot@foss.st.com, mchehab@kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH linux-next] media: i2c: st-mipid02: replace of_node_put() with __free
Date: Mon, 29 Apr 2024 09:04:15 +0000	[thread overview]
Message-ID: <Zi9ij_9vW8ADl2fC@kekkonen.localdomain> (raw)
In-Reply-To: <d2432381-827f-4825-a450-9954f8291576@foss.st.com>

Hi Benjamin,

On Mon, Apr 29, 2024 at 10:52:34AM +0200, Benjamin Mugnier wrote:
> Hi,
> 
> Thank you for your patch.
> 
> On 4/27/24 11:56, 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>
> 
> I was not aware of this kind of auto release mechanism. Thanks for
> bringing that to my eyes.
> 
> Now I looked in /drivers/media and couldn't find such structure. All
> drivers seem to follow the goto error_of_node_put style.
> As I'm unsure if we want to introduce such magic, could either Laurent
> or Sakari comment on this ?

It's new and little used so far. I don't have concerns using it, although
it's mostly useful in cases where all exit paths release the same resource.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2024-04-29  9:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27  9:56 [PATCH linux-next] media: i2c: st-mipid02: replace of_node_put() with __free R Sundar
2024-04-29  8:52 ` Benjamin Mugnier
2024-04-29  9:04   ` Sakari Ailus [this message]
2024-04-29 16:02   ` R Sundar

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=Zi9ij_9vW8ADl2fC@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=julia.lawall@inria.fr \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prosunofficial@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=sylvain.petinot@foss.st.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.