Commit 0188d08a authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390: convert to msecs_to_jiffies()

Instead of using the old 'jiffies + HZ {/,*} something' calculation
use msecs_to_jiffies() as that makes the code more readable.
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 9ebcfadb
...@@ -167,7 +167,7 @@ static struct timer_list lgr_timer; ...@@ -167,7 +167,7 @@ static struct timer_list lgr_timer;
*/ */
static void lgr_timer_set(void) static void lgr_timer_set(void)
{ {
mod_timer(&lgr_timer, jiffies + LGR_TIMER_INTERVAL_SECS * HZ); mod_timer(&lgr_timer, jiffies + msecs_to_jiffies(LGR_TIMER_INTERVAL_SECS * MSEC_PER_SEC));
} }
/* /*
......
...@@ -669,7 +669,7 @@ static void stp_work_fn(struct work_struct *work) ...@@ -669,7 +669,7 @@ static void stp_work_fn(struct work_struct *work)
* There is a usable clock but the synchonization failed. * There is a usable clock but the synchonization failed.
* Retry after a second. * Retry after a second.
*/ */
mod_timer(&stp_timer, jiffies + HZ); mod_timer(&stp_timer, jiffies + msecs_to_jiffies(MSEC_PER_SEC));
out_unlock: out_unlock:
mutex_unlock(&stp_work_mutex); mutex_unlock(&stp_work_mutex);
......
...@@ -356,9 +356,9 @@ static atomic_t topology_poll = ATOMIC_INIT(0); ...@@ -356,9 +356,9 @@ static atomic_t topology_poll = ATOMIC_INIT(0);
static void set_topology_timer(void) static void set_topology_timer(void)
{ {
if (atomic_add_unless(&topology_poll, -1, 0)) if (atomic_add_unless(&topology_poll, -1, 0))
mod_timer(&topology_timer, jiffies + HZ / 10); mod_timer(&topology_timer, jiffies + msecs_to_jiffies(100));
else else
mod_timer(&topology_timer, jiffies + HZ * 60); mod_timer(&topology_timer, jiffies + msecs_to_jiffies(60 * MSEC_PER_SEC));
} }
void topology_expect_change(void) void topology_expect_change(void)
......
...@@ -189,7 +189,7 @@ static void cmm_set_timer(void) ...@@ -189,7 +189,7 @@ static void cmm_set_timer(void)
del_timer(&cmm_timer); del_timer(&cmm_timer);
return; return;
} }
mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds * HZ); mod_timer(&cmm_timer, jiffies + msecs_to_jiffies(cmm_timeout_seconds * MSEC_PER_SEC));
} }
static void cmm_timer_fn(struct timer_list *unused) static void cmm_timer_fn(struct timer_list *unused)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment