]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme: remove redundant timeout argument from nvme_wait_freeze_timeout
authorMaurizio Lombardi <mlombard@redhat.com>
Thu, 14 May 2026 08:32:50 +0000 (10:32 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 20 May 2026 18:45:44 +0000 (11:45 -0700)
All callers of nvme_wait_freeze_timeout() currently pass the exact same
NVME_IO_TIMEOUT default as their timeout argument.

Remove it and use a local variable.

Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Mohamed Khalfella <mkhalfella@purestorage.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/apple.c
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c

index 423c9c628e7bfa769070aed3ca221c111c020678..e77c4740810218c7af4dea90330deb2d8be63c40 100644 (file)
@@ -858,7 +858,7 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
         * doing a safe shutdown.
         */
        if (!dead && shutdown && freeze)
-               nvme_wait_freeze_timeout(&anv->ctrl, NVME_IO_TIMEOUT);
+               nvme_wait_freeze_timeout(&anv->ctrl);
 
        nvme_quiesce_io_queues(&anv->ctrl);
 
index 89948d0acf18020a8919a1fa459b0515f7fe463a..f9fe7bb65ec6ed4f1b86f76c91d094a9d51b14e1 100644 (file)
@@ -5246,8 +5246,9 @@ void nvme_unfreeze(struct nvme_ctrl *ctrl)
 }
 EXPORT_SYMBOL_GPL(nvme_unfreeze);
 
-int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout)
+int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl)
 {
+       unsigned long timeout = NVME_IO_TIMEOUT;
        struct nvme_ns *ns;
        int srcu_idx;
 
index ccd5e05dac98f05f7c4149ce8288eec205e5d891..6f9ecb4948f4b948ce47cd1e921a1794b5562b60 100644 (file)
@@ -900,7 +900,7 @@ void nvme_sync_queues(struct nvme_ctrl *ctrl);
 void nvme_sync_io_queues(struct nvme_ctrl *ctrl);
 void nvme_unfreeze(struct nvme_ctrl *ctrl);
 void nvme_wait_freeze(struct nvme_ctrl *ctrl);
-int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout);
+int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl);
 void nvme_start_freeze(struct nvme_ctrl *ctrl);
 
 static inline enum req_op nvme_req_op(struct nvme_command *cmd)
index 9fd04cd7c5cb13f251015891db7a92ce279abd39..2dc1074f99844d68a58895bf85df8d3201a93ab5 100644 (file)
@@ -3276,7 +3276,7 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
                 * if doing a safe shutdown.
                 */
                if (!dead && shutdown)
-                       nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
+                       nvme_wait_freeze_timeout(&dev->ctrl);
        }
 
        nvme_quiesce_io_queues(&dev->ctrl);
index f77c960f7632d19db46d8954751bd7fb6670febe..bf73135c1439a3dafa6d65ff8715155eca336800 100644 (file)
@@ -888,7 +888,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
        if (!new) {
                nvme_start_freeze(&ctrl->ctrl);
                nvme_unquiesce_io_queues(&ctrl->ctrl);
-               if (!nvme_wait_freeze_timeout(&ctrl->ctrl, NVME_IO_TIMEOUT)) {
+               if (!nvme_wait_freeze_timeout(&ctrl->ctrl)) {
                        /*
                         * If we timed out waiting for freeze we are likely to
                         * be stuck.  Fail the controller initialization just
index 15d36d6a728e80ae17659d34e7671aa207ce3073..0552aa8a1150d79565c5cb19f06b78d18e286058 100644 (file)
@@ -2208,7 +2208,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
        if (!new) {
                nvme_start_freeze(ctrl);
                nvme_unquiesce_io_queues(ctrl);
-               if (!nvme_wait_freeze_timeout(ctrl, NVME_IO_TIMEOUT)) {
+               if (!nvme_wait_freeze_timeout(ctrl)) {
                        /*
                         * If we timed out waiting for freeze we are likely to
                         * be stuck.  Fail the controller initialization just