From: Dan Carpenter <dan.carpenter@linaro.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Stefan Wahren <wahrenst@gmx.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Umang Jain <umang.jain@ideasonboard.com>,
linux-staging@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2 07/10] staging: vchiq_arm: Reduce indentation of service_callback
Date: Wed, 12 Jun 2024 08:51:57 +0300 [thread overview]
Message-ID: <96339b9a-e523-4009-b907-3b9502bbe9b0@moroto.mountain> (raw)
In-Reply-To: <20240611212347.GG10397@pendragon.ideasonboard.com>
On Wed, Jun 12, 2024 at 12:23:47AM +0300, Laurent Pinchart wrote:
> On Tue, Jun 11, 2024 at 09:04:28AM +0300, Dan Carpenter wrote:
> > On Mon, Jun 10, 2024 at 11:02:17PM +0200, Stefan Wahren wrote:
> > > The service_callback has 5 levels of indentation, which makes it
> > > hard to read. Reduce this by splitting the code in a new function
> > > service_single_message() as suggested by Laurent Pinchart.
> > >
> > > Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> >
> > To be honest, I liked the version of this patch which Laurent didn't
> > like. Even after pulling this code into a separate function, I'd still
> > support flipping the conditions around and adding the goto...
> >
> > Laurent, you really didn't like the goto?
>
> I won't nack it, but I really think gotos seriously hinder readability,
> with the exception of error paths.
Hm... I guess I only hate backwards gotos (ones that go up instead of
down). To me this one is kind of like a goto unlock. It's slightly
more complicated than just an unlock because we add a completion as
well... I don't have strong feelings about it, I was just interested.
regards,
dan carpenter
next prev parent reply other threads:[~2024-06-12 5:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 21:02 [PATCH V2 00/10] staging: vc04_services: Random cleanups Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 01/10] staging: vchiq_arm: Unify return code variable Stefan Wahren
2024-06-11 21:14 ` Laurent Pinchart
2024-06-10 21:02 ` [PATCH V2 02/10] staging: vchiq_arm: Drop obsolete comment Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 03/10] staging: vchiq_core: Drop non-functional struct members Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 04/10] staging: vchiq_arm: Drop unnecessary declarations Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 05/10] staging: vchiq_arm: Get the rid off struct vchiq_2835_state Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 06/10] staging: vchiq_arm: Drop vchiq_arm_init_state Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 07/10] staging: vchiq_arm: Reduce indentation of service_callback Stefan Wahren
2024-06-11 6:01 ` Dan Carpenter
2024-06-11 9:58 ` Stefan Wahren
2024-06-11 6:04 ` Dan Carpenter
2024-06-11 21:23 ` Laurent Pinchart
2024-06-12 5:16 ` Stefan Wahren
2024-06-18 1:14 ` Laurent Pinchart
2024-06-12 5:51 ` Dan Carpenter [this message]
2024-06-10 21:02 ` [PATCH V2 08/10] staging: vchiq_core: Add hex prefix to debugfs output Stefan Wahren
2024-06-10 21:02 ` [PATCH V2 09/10] staging: vchiq_arm: Don't cast scatter-gather elements Stefan Wahren
2024-06-11 21:25 ` Laurent Pinchart
2024-06-10 21:02 ` [PATCH V2 10/10] staging: vc04_services: Update testing instructions Stefan Wahren
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=96339b9a-e523-4009-b907-3b9502bbe9b0@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=umang.jain@ideasonboard.com \
--cc=wahrenst@gmx.net \
/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