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

Guixin Liu kanie at linux.alibaba.com
Wed Nov 4 18:10:47 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.

Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
 drivers/nvme/host/sysfs.c | 2 --
 1 file changed, 2 deletions(-)

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