* [PATCH] nvme: drop unused variable ctrl in nvme_setup_cmd
@ 2021-12-22 9:32 Geliang Tang
2021-12-23 10:20 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2021-12-22 9:32 UTC (permalink / raw)
To: Keith Busch, Jens Axboe; +Cc: Geliang Tang, linux-nvme
The variable 'ctrl' became useless since the code using it was dropped
from nvme_setup_cmd() in the commit 292ddf67bbd5 ("nvme: increment
request genctr on completion"). Fix it to get rid of this compilation
warning in the nvme-5.17 branch:
drivers/nvme/host/core.c: In function ‘nvme_setup_cmd’:
drivers/nvme/host/core.c:993:20: warning: unused variable ‘ctrl’ [-Wunused-variable]
struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
^~~~
Fixes: 292ddf67bbd5 ("nvme: increment request genctr on completion")
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
drivers/nvme/host/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 44c375a1edbb..9666c7bf4379 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -990,7 +990,6 @@ EXPORT_SYMBOL_GPL(nvme_cleanup_cmd);
blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req)
{
struct nvme_command *cmd = nvme_req(req)->cmd;
- struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
blk_status_t ret = BLK_STS_OK;
if (!(req->rq_flags & RQF_DONTPREP))
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: drop unused variable ctrl in nvme_setup_cmd
2021-12-22 9:32 [PATCH] nvme: drop unused variable ctrl in nvme_setup_cmd Geliang Tang
@ 2021-12-23 10:20 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2021-12-23 10:20 UTC (permalink / raw)
To: Geliang Tang; +Cc: Keith Busch, Jens Axboe, linux-nvme
Thanks,
applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-23 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 9:32 [PATCH] nvme: drop unused variable ctrl in nvme_setup_cmd Geliang Tang
2021-12-23 10:20 ` Christoph Hellwig
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.