Re: [PATCH v4 03/15] iio: temp: ltc2983: Use __free(fwnode_handle) to replace fwnode_handle_put() calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Feb 2024 14:52:51 +0100
Nuno Sá <noname.nuno@xxxxxxxxx> wrote:

> On Sat, 2024-02-17 at 16:42 +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > This use of the new cleanup.h scope based freeing infrastructure allows
> > us to exit directly from error conditions and in the good path with
> > the reference obtained from fwnode_find_reference() (which may be an error
> > pointer) automatically released.
> > 
> > Cc: Cosmin Tanislav <cosmin.tanislav@xxxxxxxxxx>
> > Cc: Nuno Sá <nuno.sa@xxxxxxxxxx>
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > ---
> > v2: Move the declarations down to where they are assigned.
> > This both clearly associates the cleanup with the action that it
> > is cleaning up and avoid potential future missordering of cleanup.
> > ---  
> 
> This LGTM. Only comment is that in ltc2983_parse_dt() we do have a loop where we
> could make use of device_for_each_child_node_scoped(). It seems to me that
> change could be included in this patch.
> 
> - Nuno Sá
> 
> 

True. Not sure how I missed that.  I'll do that for v5 posting of remaining drivers.





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux