]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/inet_timewait_sock.c
[NET]: DIV_ROUND_UP cleanup (part two)
[linux-2.6-omap-h63xx.git] / net / ipv4 / inet_timewait_sock.c
index 2586df09b9b6cac0bfe2c5679e02d35038d8449e..4e189e28f3062f45f6aeca63476423ca386e757a 100644 (file)
@@ -8,7 +8,7 @@
  *             From code orinally in TCP
  */
 
-
+#include <linux/kernel.h>
 #include <net/inet_hashtables.h>
 #include <net/inet_timewait_sock.h>
 #include <net/ip.h>
@@ -292,7 +292,7 @@ void inet_twsk_schedule(struct inet_timewait_sock *tw,
                if (timeo >= timewait_len) {
                        slot = INET_TWDR_TWKILL_SLOTS - 1;
                } else {
-                       slot = (timeo + twdr->period - 1) / twdr->period;
+                       slot = DIV_ROUND_UP(timeo, twdr->period);
                        if (slot >= INET_TWDR_TWKILL_SLOTS)
                                slot = INET_TWDR_TWKILL_SLOTS - 1;
                }