]> granicus.if.org Git - ipset/commitdiff
Remove redundant linux/version.h includes from net/
authorJesper Juhl <jj@chaosbits.net>
Mon, 5 Sep 2011 15:07:17 +0000 (17:07 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 5 Sep 2011 15:07:17 +0000 (17:07 +0200)
It was suggested by "make versioncheck" that the follwing includes of
linux/version.h are redundant:

  /home/jj/src/linux-2.6/net/caif/caif_dev.c: 14 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/caif/chnl_net.c: 10 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/ipv4/gre.c: 19 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/netfilter/ipset/ip_set_core.c: 20 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/netfilter/xt_set.c: 16 linux/version.h not needed.

and it seems that it is right.

Beyond manually inspecting the source files I also did a few build
tests with various configs to confirm that including the header in
those files is indeed not needed.

Here's a patch to remove the pointless includes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_core.c
kernel/net/netfilter/xt_set.c

index bff5a375791c581861cdff1e1e1cf60f2df354ea..8571979e5f9a98fb68d1c12858bc75f9b4fb0942 100644 (file)
@@ -17,7 +17,9 @@
 #include <linux/spinlock.h>
 #include <linux/netlink.h>
 #include <linux/rculist.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(99, 99, 99)
 #include <linux/version.h>
+#endif
 #include <net/netlink.h>
 
 #include <linux/netfilter.h>
index 19461c462dbd41e3f4a595fbfaf34a7f904cff39..0ec8138aa47052f8966fde995d68f240b7d377d4 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <linux/module.h>
 #include <linux/skbuff.h>
-#include <linux/version.h>
 
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_set.h>