Skip to contentSkip to conversation

nvmet: remove ineffective initialization

PATCH Superseded Chaitanya Kulkarni 2 participants 2 messages Feb 9, 2024 – Feb 12, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chaitanya Kulkarni

author maintainer
#0 lore raw

PATCH 1/1 nvmet: remove ineffective initialization

Remove ineffective initialization of status variable in nvmet_execute_admin_connect() and nvmet_execute_io_connect(), since it is overwritten by nvmet_copy_from_sgl() and it is not used before that anywhere in respective functions.

---
 drivers/nvme/target/fabrics-cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/target/fabrics-cmd.c +2 -2
index d8da840a1c0e..9964ffe347d2 100644
@@ -209,7 +209,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
 	struct nvmf_connect_command *c = &req->cmd->connect;
 	struct nvmf_connect_data *d;
 	struct nvmet_ctrl *ctrl = NULL;
-	u16 status = 0;
+	u16 status;
 	int ret;
 
 	if (!nvmet_check_transfer_len(req, sizeof(struct nvmf_connect_data)))
@@ -290,7 +290,7 @@ static void nvmet_execute_io_connect(struct nvmet_req *req)
 	struct nvmf_connect_data *d;
 	struct nvmet_ctrl *ctrl;
 	u16 qid = le16_to_cpu(c->qid);
-	u16 status = 0;
+	u16 status;
 
 	if (!nvmet_check_transfer_len(req, sizeof(struct nvmf_connect_data)))
 		return;
Signature · 1 line
2.40.0