pkt_sched: use ns_to_ktime() helper
ns_to_ktime() seems better than ktime_set() + ktime_add_ns() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
47c1b7b95e
commit
46baac38ef
@@ -495,16 +495,15 @@ EXPORT_SYMBOL(qdisc_watchdog_init);
|
||||
|
||||
void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires)
|
||||
{
|
||||
ktime_t time;
|
||||
|
||||
if (test_bit(__QDISC_STATE_DEACTIVATED,
|
||||
&qdisc_root_sleeping(wd->qdisc)->state))
|
||||
return;
|
||||
|
||||
qdisc_throttled(wd->qdisc);
|
||||
time = ktime_set(0, 0);
|
||||
time = ktime_add_ns(time, PSCHED_TICKS2NS(expires));
|
||||
hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS);
|
||||
|
||||
hrtimer_start(&wd->timer,
|
||||
ns_to_ktime(PSCHED_TICKS2NS(expires)),
|
||||
HRTIMER_MODE_ABS);
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_schedule);
|
||||
|
||||
|
Reference in New Issue
Block a user