diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-08-28 18:50:33 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:37 -0400 |
commit | 172589ccdde41b59861c92c4a971b95514ef24e3 (patch) | |
tree | ae775e6db4cb85aad1c74b6d93ba359f9dfe88ea /net/ipv4/inet_diag.c | |
parent | c45248c70125cc374fdf264659643276c72801bf (diff) |
[NET]: DIV_ROUND_UP cleanup (part two)
Hopefully captured all single statement cases under net/. I'm
not too sure if there is some policy about #includes that are
"guaranteed" (ie., in the current tree) to be available through
some other #included header, so I just added linux/kernel.h to
each changed file that didn't #include it previously.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index def007ec1d6f..686ddd62f71a 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/fcntl.h> | 17 | #include <linux/fcntl.h> |
@@ -112,7 +113,7 @@ static int inet_csk_diag_fill(struct sock *sk, | |||
112 | } | 113 | } |
113 | #endif | 114 | #endif |
114 | 115 | ||
115 | #define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ | 116 | #define EXPIRES_IN_MS(tmo) DIV_ROUND_UP((tmo - jiffies) * 1000, HZ) |
116 | 117 | ||
117 | if (icsk->icsk_pending == ICSK_TIME_RETRANS) { | 118 | if (icsk->icsk_pending == ICSK_TIME_RETRANS) { |
118 | r->idiag_timer = 1; | 119 | r->idiag_timer = 1; |
@@ -190,7 +191,7 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw, | |||
190 | r->id.idiag_dst[0] = tw->tw_daddr; | 191 | r->id.idiag_dst[0] = tw->tw_daddr; |
191 | r->idiag_state = tw->tw_substate; | 192 | r->idiag_state = tw->tw_substate; |
192 | r->idiag_timer = 3; | 193 | r->idiag_timer = 3; |
193 | r->idiag_expires = (tmo * 1000 + HZ - 1) / HZ; | 194 | r->idiag_expires = DIV_ROUND_UP(tmo * 1000, HZ); |
194 | r->idiag_rqueue = 0; | 195 | r->idiag_rqueue = 0; |
195 | r->idiag_wqueue = 0; | 196 | r->idiag_wqueue = 0; |
196 | r->idiag_uid = 0; | 197 | r->idiag_uid = 0; |