[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAC=S1nhDRQFVBDydTq=fmC=jz8e941aPwzg+cY1ZQDqWppx+fQ@mail.gmail.com>
Date: Thu, 11 Sep 2025 16:43:45 +0800
From: Fei Shao <fshao@...omium.org>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Matthias Brugger <matthias.bgg@...il.com>, Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-remoteproc@...r.kernel.org
Subject: Re: [PATCH] remoteproc: mediatek: Use for_each_available_child_of_node_scoped()
On Wed, Sep 10, 2025 at 6:55 PM Jonathan Cameron
<jonathan.cameron@...wei.com> wrote:
>
> On Mon, 8 Sep 2025 12:43:25 +0800
> Fei Shao <fshao@...omium.org> wrote:
>
> > Use scoped for_each_available_child_of_node_scoped() to remove manual
> > of_node_put() calls from early returns.
>
> There aren't any early returns here.
>
> This runs into some of the stuff that cleanup.h docs suggest we shouldn't
> do which is combining gotos and __free() magic.
> I think this case is actually fine despite that but in general worth
> thinking about the code structure and whether that can be avoided.
>
> One option would be to factor out the loop into another function then use
> and error return from that to call the stuff under the init_free label.
Fair point, I can send a v2 with that.
Thanks,
Fei
>
> Jonathan
>
Powered by blists - more mailing lists