public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH V2] nvmet: remove superfluous initialization
@ 2024-02-13  7:58 Chaitanya Kulkarni
  2024-02-13 23:42 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Kulkarni @ 2024-02-13  7:58 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, hch, sagi, Chaitanya Kulkarni

Remove superfluous initialization of status variable in
nvmet_execute_admin_connect() and nvmet_execute_io_connect(), since it
will get overwritten by nvmet_copy_from_sgl().

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---

V2:- fix commit log and subject line (Christoph)

 drivers/nvme/target/fabrics-cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index d8da840a1c0e..9964ffe347d2 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -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;
-- 
2.40.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] nvmet: remove superfluous initialization
  2024-02-13  7:58 [PATCH V2] nvmet: remove superfluous initialization Chaitanya Kulkarni
@ 2024-02-13 23:42 ` Keith Busch
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2024-02-13 23:42 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: linux-nvme, hch, sagi

On Mon, Feb 12, 2024 at 11:58:24PM -0800, Chaitanya Kulkarni wrote:
> Remove superfluous initialization of status variable in
> nvmet_execute_admin_connect() and nvmet_execute_io_connect(), since it
> will get overwritten by nvmet_copy_from_sgl().
> 
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>

Applied to nvme-6.8, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-13 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13  7:58 [PATCH V2] nvmet: remove superfluous initialization Chaitanya Kulkarni
2024-02-13 23:42 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox