lkml.org 
[lkml]   [2024]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 5/6] spi: cs42l43: Add SPI controller support
On Fri, Jan 19, 2024 at 1:49 PM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:
> On Thu, Jan 18, 2024 at 07:06:13PM +0200, andy.shevchenko@gmail.com wrote:

..

> > > + if (is_of_node(fwnode))
> > > + fwnode = fwnode_get_named_child_node(fwnode, "spi");
> >
> > You can actually drop these is_of_node() tests and use another variable In
> > ACPI there can't be child node in small letters.
>
> is_of_node feels pretty clear what the intent is, rather than
> relying on nodes not existing etc.
>
> > But main problem here (and in another driver where the similar is used) that
> > you bumped reference count for fwnode. I haven't seen where you drop it back.
> > Have you tested rmmod/modprobe in a loop?
>
> Yeah it should drop the reference will add that.

Note, this will require an additional variable anyway (as in the
infamous `x = realloc(x...)` mistake).

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2024-01-19 17:10    [W:0.152 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site