From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: hare@suse.de, james.smart@broadcom.com,
linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCH 1/2] nvmet-auth: remove unnecessary break after goto
Date: Sat, 20 May 2023 07:01:26 +0200 [thread overview]
Message-ID: <20230520050126.GA32314@lst.de> (raw)
In-Reply-To: <20230519094052.48575-1-kch@nvidia.com>
On Fri, May 19, 2023 at 02:40:51AM -0700, Chaitanya Kulkarni wrote:
> Remove dead break after goto.
As a trivial cleanup this looks fine, but I really hate the structure
of this code.
Can't we have local variables that we set to the dhchap_status and
dhchap_step, and then after the done label just conditionally assign
them if dhchap_status is non-zero? This should clean up a lot of
mess, especially we'd be done to very few assignments of the step,
and we could avoid jumping out of the switch entirely.
next prev parent reply other threads:[~2023-05-20 5:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230526060759epcas5p3cadfc28c2b45dfc1955cc1bd21f2a351@epcas5p3.samsung.com>
2023-05-19 9:40 ` [PATCH 1/2] nvmet-auth: remove unnecessary break after goto Chaitanya Kulkarni
2023-05-19 9:40 ` [PATCH 2/2] nvme-fcloop: no need to return from void function Chaitanya Kulkarni
2023-05-20 5:01 ` Christoph Hellwig
2023-05-21 9:56 ` Max Gurtovoy
2023-05-26 6:05 ` Nitesh Shetty
2023-05-20 5:01 ` Christoph Hellwig [this message]
2023-05-20 8:02 ` [PATCH 1/2] nvmet-auth: remove unnecessary break after goto Chaitanya Kulkarni
2023-05-25 18:04 ` Keith Busch
2023-05-26 6:04 ` Nitesh Shetty
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=20230520050126.GA32314@lst.de \
--to=hch@lst.de \
--cc=hare@suse.de \
--cc=james.smart@broadcom.com \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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