]> err.no Git - linux-2.6/blobdiff - net/core/net-sysfs.c
[NETFILTER]: nf_nat: sprinkle a few __read_mostlys
[linux-2.6] / net / core / net-sysfs.c
index 6628e457ddc0f1179e3e5fc42e965eaf19b9b283..e41f4b9d2e7e50c96796f426130f3addb09721d8 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/wireless.h>
 #include <net/iw_handler.h>
 
+#include "net-sysfs.h"
+
 #ifdef CONFIG_SYSFS
 static const char fmt_hex[] = "%#x\n";
 static const char fmt_long_hex[] = "%#lx\n";
@@ -245,9 +247,8 @@ static ssize_t netstat_show(const struct device *d,
        struct net_device_stats *stats;
        ssize_t ret = -EINVAL;
 
-       if (offset > sizeof(struct net_device_stats) ||
-           offset % sizeof(unsigned long) != 0)
-               WARN_ON(1);
+       WARN_ON(offset > sizeof(struct net_device_stats) ||
+                       offset % sizeof(unsigned long) != 0);
 
        read_lock(&dev_base_lock);
        if (dev_isalive(dev) && dev->get_stats &&