diff options
author | Xin Long <lucien.xin@gmail.com> | 2016-04-19 15:10:01 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-21 13:55:33 -0400 |
commit | b7de529c793c9131e58ddca37d49fd26866aa867 (patch) | |
tree | c035315018d32fe1aa69f34d82a37277cf73b059 /net/sctp | |
parent | 85b67bcb7e4a23ced05e7020bf5843b9857f6881 (diff) | |
download | linux-b7de529c793c9131e58ddca37d49fd26866aa867.tar.bz2 |
net: use jiffies_to_msecs to replace EXPIRES_IN_MS in inet/sctp_diag
EXPIRES_IN_MS macro comes from net/ipv4/inet_diag.c and dates
back to before jiffies_to_msecs() has been introduced.
Now we can remove it and use jiffies_to_msecs().
Suggested-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jakub Sitnicki <jkbs@redhat.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/sctp_diag.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c index 98ecd16da0c9..bb2d8d9608e9 100644 --- a/net/sctp/sctp_diag.c +++ b/net/sctp/sctp_diag.c @@ -48,10 +48,8 @@ static void inet_diag_msg_sctpasoc_fill(struct inet_diag_msg *r, r->idiag_state = asoc->state; r->idiag_timer = SCTP_EVENT_TIMEOUT_T3_RTX; r->idiag_retrans = asoc->rtx_data_chunks; -#define EXPIRES_IN_MS(tmo) DIV_ROUND_UP((tmo - jiffies) * 1000, HZ) - r->idiag_expires = - EXPIRES_IN_MS(asoc->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX]); -#undef EXPIRES_IN_MS + r->idiag_expires = jiffies_to_msecs( + asoc->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX] - jiffies); } static int inet_diag_msg_sctpladdrs_fill(struct sk_buff *skb, |