linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] edac: fix period calculation in edac_device_reset_delay_period()
@ 2022-10-20 11:42 Eliav Farber
  0 siblings, 0 replies; only message in thread
From: Eliav Farber @ 2022-10-20 11:42 UTC (permalink / raw)
  To: bp, mchehab, tony.luck, james.morse, rric, linux-edac, linux-kernel
  Cc: talel, jonnyc, hhhawa, hanochu, farbere, itamark, shellykz,
	amitlavi, dkl

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.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/edac/edac_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 19522c568aa5..88942a6edc2c 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -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;
-- 
2.37.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-20 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 11:42 [PATCH] edac: fix period calculation in edac_device_reset_delay_period() Eliav Farber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).