[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230602084028.GL68926@ediswmail.ad.cirrus.com>
Date: Fri, 2 Jun 2023 08:40:28 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
CC: <vkoul@...nel.org>, <yung-chuan.liao@...ux.intel.com>,
<sanyog.r.kale@...el.com>, <alsa-devel@...a-project.org>,
<linux-kernel@...r.kernel.org>, <patches@...nsource.cirrus.com>
Subject: Re: [PATCH 3/4] soundwire: stream: Remove unnecessary gotos
On Thu, Jun 01, 2023 at 11:37:33AM -0500, Pierre-Louis Bossart wrote:
>
>
> On 6/1/23 11:16, Charles Keepax wrote:
> > There is a lot of code using gotos to skip small sections of code, this
> > is a fairly dubious use of a goto, especially when the level of
> > intentation is really low. Most of this code doesn't even breach 80
> > characters when naively shifted over.
> >
> > Simplify the code a bit, by replacing these unnecessary gotos with
> > simple ifs.
>
> it's probably ok but far from simple to review with the inverted states
> for variables. I don't have the time and energy to revisit this...
>
> I would err on the side of if it ain't broke don't fix it here.
>
The current code is pretty oddly written, as you say it does work
through. I will try splitting the patch into separate patches for
inverting the varible and dropping the goto's. That should make
review slightly easier and both changes make the code clearer in
their own right anyway.
Thanks,
Charles
Powered by blists - more mailing lists