lkml.org 
[lkml]   [2020]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 4/7] RAS/CEC: Modify cec_mod_work() for common use
Date
Modify the function cec_mod_work() for the common use
with the other error sources.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
---
drivers/ras/cec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 803e641d8e5c..f869e7a270b8 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -167,12 +167,12 @@ static void do_spring_cleaning(struct ce_array *ca)
/*
* @interval in seconds
*/
-static void cec_mod_work(unsigned long interval)
+static void cec_mod_work(struct delayed_work *dwork, unsigned long interval)
{
unsigned long iv;

iv = interval * HZ;
- mod_delayed_work(system_wq, &cec_work, round_jiffies(iv));
+ mod_delayed_work(system_wq, dwork, round_jiffies(iv));
}

static void cec_work_fn(struct work_struct *work)
@@ -181,7 +181,7 @@ static void cec_work_fn(struct work_struct *work)
do_spring_cleaning(&ce_arr);
mutex_unlock(&ce_mutex);

- cec_mod_work(decay_interval);
+ cec_mod_work(&cec_work, decay_interval);
}

/*
@@ -420,7 +420,7 @@ static int decay_interval_set(void *data, u64 val)
*(u64 *)data = val;
decay_interval = val;

- cec_mod_work(decay_interval);
+ cec_mod_work(&cec_work, decay_interval);

return 0;
}
--
2.17.1

\
 
 \ /
  Last update: 2020-10-02 14:31    [W:1.368 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site