[PATCH 8/9] nvmet: passthru: remove unreachable break statements

Guixin Liu kanie at linux.alibaba.com
Wed Nov 4 18:10:50 PST 2026


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 at 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




More information about the Linux-nvme mailing list