[PATCH v2 5/9] nvme: drop unreachable "off" case in reconnect_delay_show()

Guixin Liu kanie at linux.alibaba.com
Thu Nov 5 18:27:32 PST 2026


The "off" case was copied from fast_io_fail_tmo_show(), but unlike
fast_io_fail_tmo, reconnect_delay is an unsigned int that the option
parser bounds to positive values and that has no off state. The
comparison can only trigger when the raw value 4294967295 is written
through sysfs, which is not a meaningful delay. Drop the case and
the matching sentence in the ABI documentation.

Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
 Documentation/ABI/stable/sysfs-nvme | 3 +--
 drivers/nvme/host/sysfs.c           | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-nvme b/Documentation/ABI/stable/sysfs-nvme
index 9291595f8102..1826df9161d2 100644
--- a/Documentation/ABI/stable/sysfs-nvme
+++ b/Documentation/ABI/stable/sysfs-nvme
@@ -70,8 +70,7 @@ Description:
 		fabrics controller.
 
 		reconnect_delay: Shows or sets the reconnect delay in
-		seconds. Reading returns the delay value, or "off" if
-		disabled.
+		seconds. Reading returns the delay value.
 
 		ctrl_loss_tmo: Shows or sets the controller loss timeout in
 		seconds. Reading returns the timeout value, or "off" if
diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c
index 10018c6356b6..3724b5ce03a0 100644
--- a/drivers/nvme/host/sysfs.c
+++ b/drivers/nvme/host/sysfs.c
@@ -618,8 +618,6 @@ static ssize_t nvme_ctrl_reconnect_delay_show(struct device *dev,
 {
 	struct nvme_ctrl *ctrl = dev_get_drvdata(dev);
 
-	if (ctrl->opts->reconnect_delay == -1)
-		return sysfs_emit(buf, "off\n");
 	return sysfs_emit(buf, "%d\n", ctrl->opts->reconnect_delay);
 }
 
-- 
2.43.7




More information about the Linux-nvme mailing list