Skip to content

Commit 985fd98

Browse files
dcarattidavem330
authored andcommitted
net/sched: act_police: re-use tcf_tm_dump()
Use tcf_tm_dump(), instead of an open coded variant (no functional change in this patch). Signed-off-by: Davide Caratti <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3e78815 commit 985fd98

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/sched/act_police.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,7 @@ static int tcf_police_dump(struct sk_buff *skb, struct tc_action *a,
345345
nla_put_u32(skb, TCA_POLICE_AVRATE, p->tcfp_ewma_rate))
346346
goto nla_put_failure;
347347

348-
t.install = jiffies_to_clock_t(jiffies - police->tcf_tm.install);
349-
t.lastuse = jiffies_to_clock_t(jiffies - police->tcf_tm.lastuse);
350-
t.firstuse = jiffies_to_clock_t(jiffies - police->tcf_tm.firstuse);
351-
t.expires = jiffies_to_clock_t(police->tcf_tm.expires);
348+
tcf_tm_dump(&t, &police->tcf_tm);
352349
if (nla_put_64bit(skb, TCA_POLICE_TM, sizeof(t), &t, TCA_POLICE_PAD))
353350
goto nla_put_failure;
354351
spin_unlock_bh(&police->tcf_lock);

0 commit comments

Comments
 (0)