lkml.org 
[lkml]   [2022]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2] edac: fix period calculation in edac_device_reset_delay_period()
On Thu, Oct 20, 2022 at 12:44:58PM +0000, Eliav Farber wrote:
> 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>

Fixes: c4cf3b454eca ("EDAC: Rework workqueue handling")

I guess.

Also, I think the one-liner below does the same, no?

---

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;
--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2023-03-26 23:23    [W:0.066 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site