Skip to content

Commit b5b0504

Browse files
committed
nvme: don't pass cap to nvme_disable_ctrl
All seem to call it with ctrl->cap so no need to pass it at all. Reviewed-by: Minwoo Im <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]>
1 parent c0f2f45 commit b5b0504

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled)
19501950
* bits', but doing so may cause the device to complete commands to the
19511951
* admin queue ... and we don't know what memory that might be pointing at!
19521952
*/
1953-
int nvme_disable_ctrl(struct nvme_ctrl *ctrl, u64 cap)
1953+
int nvme_disable_ctrl(struct nvme_ctrl *ctrl)
19541954
{
19551955
int ret;
19561956

@@ -1964,7 +1964,7 @@ int nvme_disable_ctrl(struct nvme_ctrl *ctrl, u64 cap)
19641964
if (ctrl->quirks & NVME_QUIRK_DELAY_BEFORE_CHK_RDY)
19651965
msleep(NVME_QUIRK_DELAY_AMOUNT);
19661966

1967-
return nvme_wait_ready(ctrl, cap, false);
1967+
return nvme_wait_ready(ctrl, ctrl->cap, false);
19681968
}
19691969
EXPORT_SYMBOL_GPL(nvme_disable_ctrl);
19701970

drivers/nvme/host/nvme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ void nvme_complete_rq(struct request *req);
426426
bool nvme_cancel_request(struct request *req, void *data, bool reserved);
427427
bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
428428
enum nvme_ctrl_state new_state);
429-
int nvme_disable_ctrl(struct nvme_ctrl *ctrl, u64 cap);
429+
int nvme_disable_ctrl(struct nvme_ctrl *ctrl);
430430
int nvme_enable_ctrl(struct nvme_ctrl *ctrl);
431431
int nvme_shutdown_ctrl(struct nvme_ctrl *ctrl);
432432
int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,

drivers/nvme/host/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown)
14031403
if (shutdown)
14041404
nvme_shutdown_ctrl(&dev->ctrl);
14051405
else
1406-
nvme_disable_ctrl(&dev->ctrl, dev->ctrl.cap);
1406+
nvme_disable_ctrl(&dev->ctrl);
14071407

14081408
nvme_poll_irqdisable(nvmeq, -1);
14091409
}
@@ -1679,7 +1679,7 @@ static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)
16791679
(readl(dev->bar + NVME_REG_CSTS) & NVME_CSTS_NSSRO))
16801680
writel(NVME_CSTS_NSSRO, dev->bar + NVME_REG_CSTS);
16811681

1682-
result = nvme_disable_ctrl(&dev->ctrl, dev->ctrl.cap);
1682+
result = nvme_disable_ctrl(&dev->ctrl);
16831683
if (result < 0)
16841684
return result;
16851685

drivers/nvme/host/rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ static void nvme_rdma_shutdown_ctrl(struct nvme_rdma_ctrl *ctrl, bool shutdown)
18591859
if (shutdown)
18601860
nvme_shutdown_ctrl(&ctrl->ctrl);
18611861
else
1862-
nvme_disable_ctrl(&ctrl->ctrl, ctrl->ctrl.cap);
1862+
nvme_disable_ctrl(&ctrl->ctrl);
18631863
nvme_rdma_teardown_admin_queue(ctrl, shutdown);
18641864
}
18651865

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ static void nvme_tcp_teardown_ctrl(struct nvme_ctrl *ctrl, bool shutdown)
18861886
if (shutdown)
18871887
nvme_shutdown_ctrl(ctrl);
18881888
else
1889-
nvme_disable_ctrl(ctrl, ctrl->cap);
1889+
nvme_disable_ctrl(ctrl);
18901890
nvme_tcp_teardown_admin_queue(ctrl, shutdown);
18911891
}
18921892

0 commit comments

Comments
 (0)