]> err.no Git - linux-2.6/blobdiff - net/core/utils.c
bridge: fix compile warning in net/bridge/br_netfilter.c
[linux-2.6] / net / core / utils.c
index 34459c4c740c91ba3f17f1946e4aa3e591ea1990..72e0ebe964a08d03be218b8c17aa061818579f2f 100644 (file)
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
-int net_msg_cost __read_mostly = 5*HZ;
-int net_msg_burst __read_mostly = 10;
 int net_msg_warn __read_mostly = 1;
 EXPORT_SYMBOL(net_msg_warn);
 
+DEFINE_RATELIMIT_STATE(net_ratelimit_state, 5 * HZ, 10);
 /*
  * All net warning printk()s should be guarded by this function.
  */
 int net_ratelimit(void)
 {
-       return __printk_ratelimit(net_msg_cost, net_msg_burst);
+       return __ratelimit(&net_ratelimit_state);
 }
 EXPORT_SYMBOL(net_ratelimit);
 
@@ -91,17 +90,6 @@ EXPORT_SYMBOL(in_aton);
 #define IN6PTON_NULL           0x20000000      /* first/tail */
 #define IN6PTON_UNKNOWN                0x40000000
 
-static inline int digit2bin(char c, int delim)
-{
-       if (c == delim || c == '\0')
-               return IN6PTON_DELIM;
-       if (c == '.')
-               return IN6PTON_DOT;
-       if (c >= '0' && c <= '9')
-               return (IN6PTON_DIGIT | (c - '0'));
-       return IN6PTON_UNKNOWN;
-}
-
 static inline int xdigit2bin(char c, int delim)
 {
        if (c == delim || c == '\0')