From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <vkoul@kernel.org>, <yung-chuan.liao@linux.intel.com>,
<sanyog.r.kale@intel.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH 3/4] soundwire: stream: Remove unnecessary gotos
Date: Fri, 2 Jun 2023 08:40:28 +0000 [thread overview]
Message-ID: <20230602084028.GL68926@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <40d09b30-3323-f438-0f12-bc322ee389e9@linux.intel.com>
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
next prev parent reply other threads:[~2023-06-02 8:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 16:16 [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Charles Keepax
2023-06-01 16:16 ` [PATCH 2/4] soundwire: bandwidth allocation: Remove pointless variable Charles Keepax
2023-06-01 16:39 ` Pierre-Louis Bossart
2023-06-01 16:16 ` [PATCH 3/4] soundwire: stream: Remove unnecessary gotos Charles Keepax
2023-06-01 16:37 ` Pierre-Louis Bossart
2023-06-02 8:40 ` Charles Keepax [this message]
2023-06-01 16:16 ` [PATCH 4/4] soundwire: stream: Tidy do_bank_switch error messages Charles Keepax
2023-06-01 16:34 ` Pierre-Louis Bossart
2023-06-02 8:38 ` Charles Keepax
2023-06-01 16:43 ` [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230602084028.GL68926@ediswmail.ad.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®