From 7eb8ca4961f5189ede9492b072bd517434c53c74 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 5 Sep 2011 17:07:17 +0200 Subject: [PATCH] Remove redundant linux/version.h includes from net/ 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 Acked-by: Jozsef Kadlecsik --- kernel/net/netfilter/ipset/ip_set_core.c | 2 ++ kernel/net/netfilter/xt_set.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c index bff5a37..8571979 100644 --- a/kernel/net/netfilter/ipset/ip_set_core.c +++ b/kernel/net/netfilter/ipset/ip_set_core.c @@ -17,7 +17,9 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(99, 99, 99) #include +#endif #include #include diff --git a/kernel/net/netfilter/xt_set.c b/kernel/net/netfilter/xt_set.c index 19461c4..0ec8138 100644 --- a/kernel/net/netfilter/xt_set.c +++ b/kernel/net/netfilter/xt_set.c @@ -13,7 +13,6 @@ #include #include -#include #include #include -- 2.40.0