* [PATCH] nvme-core: remove unnecessary function parameter
@ 2022-01-22 5:05 Chaitanya Kulkarni
2022-01-23 9:17 ` Sagi Grimberg
2022-01-26 16:17 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-01-22 5:05 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, kbusch, sagi, Chaitanya Kulkarni
From: Chaitanya Kulkarni <kch@nvidia.com>
In function nvme_execute_rq() we don't use gendisk parameter at all.
Remove the unsed parameter and adjust the calls.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/nvme/host/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1759538b36fc..7990c08889da 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1048,8 +1048,7 @@ EXPORT_SYMBOL_GPL(nvme_setup_cmd);
* >0: nvme controller's cqe status response
* <0: kernel error in lieu of controller response
*/
-static int nvme_execute_rq(struct gendisk *disk, struct request *rq,
- bool at_head)
+static int nvme_execute_rq(struct request *rq, bool at_head)
{
blk_status_t status;
@@ -1089,7 +1088,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
goto out;
}
- ret = nvme_execute_rq(NULL, req, at_head);
+ ret = nvme_execute_rq(req, at_head);
if (result && ret >= 0)
*result = nvme_req(req)->result;
out:
@@ -1205,12 +1204,11 @@ int nvme_execute_passthru_rq(struct request *rq)
struct nvme_command *cmd = nvme_req(rq)->cmd;
struct nvme_ctrl *ctrl = nvme_req(rq)->ctrl;
struct nvme_ns *ns = rq->q->queuedata;
- struct gendisk *disk = ns ? ns->disk : NULL;
u32 effects;
int ret;
effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode);
- ret = nvme_execute_rq(disk, rq, false);
+ ret = nvme_execute_rq(rq, false);
if (effects) /* nothing to be done for zero cmd effects */
nvme_passthru_end(ctrl, effects, cmd, ret);
--
2.29.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: remove unnecessary function parameter
2022-01-22 5:05 [PATCH] nvme-core: remove unnecessary function parameter Chaitanya Kulkarni
@ 2022-01-23 9:17 ` Sagi Grimberg
2022-01-26 16:17 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2022-01-23 9:17 UTC (permalink / raw)
To: Chaitanya Kulkarni, linux-nvme; +Cc: hch, kbusch, Chaitanya Kulkarni
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: remove unnecessary function parameter
2022-01-22 5:05 [PATCH] nvme-core: remove unnecessary function parameter Chaitanya Kulkarni
2022-01-23 9:17 ` Sagi Grimberg
@ 2022-01-26 16:17 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-01-26 16:17 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: linux-nvme, hch, kbusch, sagi, Chaitanya Kulkarni
Thanks,
applied to nvme-5.17.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-26 17:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 5:05 [PATCH] nvme-core: remove unnecessary function parameter Chaitanya Kulkarni
2022-01-23 9:17 ` Sagi Grimberg
2022-01-26 16:17 ` 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.