All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Nilay Shroff <nilay@linux.ibm.com>,
	Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH v2 8/9] nvmet: passthru: remove unreachable break statements
Date: Fri,  6 Nov 2026 10:27:35 +0800	[thread overview]
Message-ID: <20261106022736.3582824-9-kanie@linux.alibaba.com> (raw)
In-Reply-To: <20261106022736.3582824-1-kanie@linux.alibaba.com>

In the nvme_admin_set_features and nvme_admin_get_features handlers of
nvmet_passthru_parse_cmd(), every path of the inner switch over the
feature id returns, so the break statement following the switch can
never be reached. Remove them.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/nvme/target/passthru.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index 6b67880c7bb2..32ae4b6b59bf 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -550,7 +550,6 @@ u16 nvmet_parse_passthru_admin_cmd(struct nvmet_req *req)
 		default:
 			return nvmet_passthru_get_set_features(req);
 		}
-		break;
 	case nvme_admin_get_features:
 		switch (le32_to_cpu(req->cmd->features.fid)) {
 		case NVME_FEAT_ASYNC_EVENT:
@@ -564,7 +563,6 @@ u16 nvmet_parse_passthru_admin_cmd(struct nvmet_req *req)
 		default:
 			return nvmet_passthru_get_set_features(req);
 		}
-		break;
 	case nvme_admin_identify:
 		switch (req->cmd->identify.cns) {
 		case NVME_ID_CNS_CS_CTRL:
-- 
2.43.7



  parent reply	other threads:[~2026-11-06  2:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  2:27 [PATCH v2 0/9] nvme: dead code cleanups Guixin Liu
2026-11-06  2:27 ` [PATCH v2 1/9] nvme-pci: remove write-only NVMEQ_DELETE_ERROR flag Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:12   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 2/9] nvme-fc: remove dead seqno field in nvme_fc_queue Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:16   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 3/9] nvme-auth: remove dead entry field in nvme_dhchap_queue_context Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:16   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 4/9] nvme-fabrics: remove dead hostnqn already-assigned check Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 5/9] nvme: drop unreachable "off" case in reconnect_delay_show() Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 6/9] nvmet-fc: remove dead fields in nvmet_fc_ls_iod and nvmet_fc_tgt_queue Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 7/9] nvmet: remove unreachable "pcie" entry from the address family map Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:19   ` Nilay Shroff
2026-11-06  2:27 ` Guixin Liu [this message]
2026-11-06 10:38   ` [PATCH v2 8/9] nvmet: passthru: remove unreachable break statements Christoph Hellwig
2026-11-06 13:20   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 9/9] nvmet-pci-epf: don't drain the never-populated SQ list Guixin Liu
2026-11-06 10:38   ` Christoph Hellwig
2026-11-06 13:20   ` Nilay Shroff
2026-11-06 16:13 ` [PATCH v2 0/9] nvme: dead code cleanups Keith Busch

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=20261106022736.3582824-9-kanie@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.