[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zi9ij_9vW8ADl2fC@kekkonen.localdomain>
Date: Mon, 29 Apr 2024 09:04:15 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Benjamin Mugnier <benjamin.mugnier@...s.st.com>
Cc: R Sundar <prosunofficial@...il.com>, sylvain.petinot@...s.st.com,
mchehab@...nel.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org, javier.carrasco.cruz@...il.com,
Julia Lawall <julia.lawall@...ia.fr>
Subject: Re: [PATCH linux-next] media: i2c: st-mipid02: replace of_node_put()
with __free
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@...ia.fr>
> > Signed-off-by: R Sundar <prosunofficial@...il.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
Powered by blists - more mailing lists