summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-02-10 16:43:50 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-13 22:23:39 -0500
commitfb585b44383c4cff85f92e67377ee1c5f07d6dc1 (patch)
treed4fd25ce57198133f90c637abdd578094725b587 /include
parent37fabbf4d489cc2e1cbf7cde816d9453a65ddfb7 (diff)
downloadlinux-stable-fb585b44383c4cff85f92e67377ee1c5f07d6dc1.tar.gz
linux-stable-fb585b44383c4cff85f92e67377ee1c5f07d6dc1.tar.bz2
linux-stable-fb585b44383c4cff85f92e67377ee1c5f07d6dc1.zip
net: make net_device members garp_port and mrp_port conditional
garp_port is only used in net/802/garp.c which is only compiled with CONFIG_GARP enabled. Same goes for mrp_port which is only used in net/802/mrp.c with CONFIG_MRP enabled. Only include the two members in struct net_device if their respective CONFIG_* is enabled. This saves a few bytes in struct net_device in case CONFIG_GARP or CONFIG_MRP are not enabled. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 54c82b5df0ba..98f65ed8f8b0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1865,8 +1865,12 @@ struct net_device {
struct pcpu_vstats __percpu *vstats;
};
+#if IS_ENABLED(CONFIG_GARP)
struct garp_port __rcu *garp_port;
+#endif
+#if IS_ENABLED(CONFIG_MRP)
struct mrp_port __rcu *mrp_port;
+#endif
struct device dev;
const struct attribute_group *sysfs_groups[4];