Skip to contentSkip to conversation

edac: fix period calculation in edac_device_reset_delay_period()

PATCH Superseded Eliav Farber 1 participant 1 message Oct 20, 2022 EDAC-core

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 edac: fix period calculation in edac_device_reset_delay_period()

Fix period calculation in case user sets a value of 1000. The input of round_jiffies_relative() should be in jiffies and not in milli-seconds.

---
 drivers/edac/edac_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/edac_device.c +1 -1
index 19522c568aa5..88942a6edc2c 100644
@@ -399,7 +399,7 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
 	unsigned long jiffs = msecs_to_jiffies(value);
 
 	if (value == 1000)
-		jiffs = round_jiffies_relative(value);
+		jiffs = round_jiffies_relative(jiffs);
 
 	edac_dev->poll_msec = value;
 	edac_dev->delay	    = jiffs;
Signature · 1 line
2.37.1