[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vf0BdOj_Bcxs3L=aznUzoMptPF+tDBpOcBKOcVTH45+Hg@mail.gmail.com>
Date: Fri, 19 Jan 2024 18:09:28 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: broonie@...nel.org, lee@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
linus.walleij@...aro.org, vkoul@...nel.org, lgirdwood@...il.com,
yung-chuan.liao@...ux.intel.com, sanyog.r.kale@...el.com,
pierre-louis.bossart@...ux.intel.com, alsa-devel@...a-project.org,
patches@...nsource.cirrus.com, devicetree@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 5/6] spi: cs42l43: Add SPI controller support
On Fri, Jan 19, 2024 at 1:49 PM Charles Keepax
<ckeepax@...nsource.cirrus.com> wrote:
> On Thu, Jan 18, 2024 at 07:06:13PM +0200, andy.shevchenko@...il.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
Powered by blists - more mailing lists