[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f451ffba-db26-4a3b-a4b3-186c31f2ad64@web.de>
Date: Sat, 2 Mar 2024 11:40:26 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Luca Ceresoli <luca.ceresoli@...tlin.com>, linux-staging@...ts.linux.dev,
linux-tegra@...r.kernel.org, linux-media@...r.kernel.org,
kernel-janitors@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Hunter <jonathanh@...dia.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Thierry Reding <thierry.reding@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: staging: media: tegra-video: Use common error handling code in
tegra_vi_graph_parse_one()
>>> Add a jump target so that a bit of exception handling can be better reused
>>> at the end of this function implementation.
…
>> Reviewed-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
>
> These patches make the code worse. If we're in the middle of a loop,
> then we should clean up the partial loop before doing the goto.
> Otherwise it creates a mess when we add a new allocation function after
> the end of the loop.
How does such a feedback fit to another known information source?
Section “7) Centralized exiting of functions”
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.8-rc6#n526
> Someone is going to add a _scoped() loop which uses cleanup.h magic to
> call _put automatically. This is a good option.
I became also curious how scope-based resource management will influence
Linux coding styles further.
Will various collateral evolution become more interesting?
Regards,
Markus
Powered by blists - more mailing lists