ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
@@ -253,7 +253,7 @@ static enum hrtimer_restart ec_bhf_timer_fun(struct hrtimer *timer)
|
||||
if (!netif_running(priv->net_dev))
|
||||
return HRTIMER_NORESTART;
|
||||
|
||||
hrtimer_forward_now(timer, ktime_set(0, polling_frequency));
|
||||
hrtimer_forward_now(timer, polling_frequency);
|
||||
return HRTIMER_RESTART;
|
||||
}
|
||||
|
||||
@@ -427,8 +427,7 @@ static int ec_bhf_open(struct net_device *net_dev)
|
||||
|
||||
hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
priv->hrtimer.function = ec_bhf_timer_fun;
|
||||
hrtimer_start(&priv->hrtimer, ktime_set(0, polling_frequency),
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL);
|
||||
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user