From 1ef8019be8799c39f316a772ffdd705c46029752 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 10 Nov 2014 13:27:49 -0500 Subject: [PATCH] net: Move bonding headers under include/net This ways drivers like cxgb4 don't need to do ugly relative includes. Reported-by: Joe Perches Signed-off-by: David S. Miller --- drivers/net/bonding/bond_3ad.c | 4 ++-- drivers/net/bonding/bond_alb.c | 4 ++-- drivers/net/bonding/bond_debugfs.c | 4 ++-- drivers/net/bonding/bond_main.c | 6 +++--- drivers/net/bonding/bond_netlink.c | 2 +- drivers/net/bonding/bond_options.c | 2 +- drivers/net/bonding/bond_procfs.c | 2 +- drivers/net/bonding/bond_sysfs.c | 2 +- drivers/net/bonding/bond_sysfs_slave.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +-- {drivers/net/bonding => include/net}/bond_3ad.h | 6 +++--- {drivers/net/bonding => include/net}/bond_alb.h | 6 +++--- {drivers/net/bonding => include/net}/bond_options.h | 6 +++--- {drivers/net/bonding => include/net}/bonding.h | 12 ++++++------ 14 files changed, 30 insertions(+), 31 deletions(-) rename {drivers/net/bonding => include/net}/bond_3ad.h (99%) rename {drivers/net/bonding => include/net}/bond_alb.h (98%) rename {drivers/net/bonding => include/net}/bond_options.h (97%) rename {drivers/net/bonding => include/net}/bonding.h (99%) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 2110215f3528..0a32143af12b 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -29,8 +29,8 @@ #include #include #include -#include "bonding.h" -#include "bond_3ad.h" +#include +#include /* General definitions */ #define AD_SHORT_TIMEOUT 1 diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index baa58e79256a..e1f1a006af85 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -37,8 +37,8 @@ #include #include #include -#include "bonding.h" -#include "bond_alb.h" +#include +#include diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c index 8f99082f90eb..e52e25a977fa 100644 --- a/drivers/net/bonding/bond_debugfs.c +++ b/drivers/net/bonding/bond_debugfs.c @@ -3,8 +3,8 @@ #include #include -#include "bonding.h" -#include "bond_alb.h" +#include +#include #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_NET_NS) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c7520082fb0d..b9b34566b9b8 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -77,9 +77,9 @@ #include #include #include -#include "bonding.h" -#include "bond_3ad.h" -#include "bond_alb.h" +#include +#include +#include /*---------------------------- Module parameters ----------------------------*/ diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c index c13d83e15ace..3e6eebd5be50 100644 --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c @@ -17,7 +17,7 @@ #include #include #include -#include "bonding.h" +#include static size_t bond_get_slave_size(const struct net_device *bond_dev, const struct net_device *slave_dev) diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index b62697f4a3de..1a61cc9b3402 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -16,7 +16,7 @@ #include #include #include -#include "bonding.h" +#include static int bond_option_active_slave_set(struct bonding *bond, const struct bond_opt_value *newval); diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c index a3948f8d1e53..976f5ad2a0f2 100644 --- a/drivers/net/bonding/bond_procfs.c +++ b/drivers/net/bonding/bond_procfs.c @@ -2,7 +2,7 @@ #include #include #include -#include "bonding.h" +#include static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos) diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 8ffbafd500fd..7e9e151d4d61 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -40,7 +40,7 @@ #include #include -#include "bonding.h" +#include #define to_dev(obj) container_of(obj, struct device, kobj) #define to_bond(cd) ((struct bonding *)(netdev_priv(to_net_dev(cd)))) diff --git a/drivers/net/bonding/bond_sysfs_slave.c b/drivers/net/bonding/bond_sysfs_slave.c index b01b0ce4d1be..23618a831612 100644 --- a/drivers/net/bonding/bond_sysfs_slave.c +++ b/drivers/net/bonding/bond_sysfs_slave.c @@ -12,7 +12,7 @@ #include #include -#include "bonding.h" +#include struct slave_attribute { struct attribute attr; diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index a9c117fdf77c..d13d36abe55c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include "cxgb4.h" @@ -71,8 +72,6 @@ #include "cxgb4_debugfs.h" #include "l2t.h" -#include <../drivers/net/bonding/bonding.h> - #ifdef DRV_VERSION #undef DRV_VERSION #endif diff --git a/drivers/net/bonding/bond_3ad.h b/include/net/bond_3ad.h similarity index 99% rename from drivers/net/bonding/bond_3ad.h rename to include/net/bond_3ad.h index c5f14ac63f3e..e01d903633ef 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/include/net/bond_3ad.h @@ -20,8 +20,8 @@ * */ -#ifndef __BOND_3AD_H__ -#define __BOND_3AD_H__ +#ifndef _NET_BOND_3AD_H +#define _NET_BOND_3AD_H #include #include @@ -279,5 +279,5 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave); int bond_3ad_set_carrier(struct bonding *bond); void bond_3ad_update_lacp_rate(struct bonding *bond); -#endif /* __BOND_3AD_H__ */ +#endif /* _NET_BOND_3AD_H */ diff --git a/drivers/net/bonding/bond_alb.h b/include/net/bond_alb.h similarity index 98% rename from drivers/net/bonding/bond_alb.h rename to include/net/bond_alb.h index 1ad473b4ade5..313a8d3b3069 100644 --- a/drivers/net/bonding/bond_alb.h +++ b/include/net/bond_alb.h @@ -19,8 +19,8 @@ * */ -#ifndef __BOND_ALB_H__ -#define __BOND_ALB_H__ +#ifndef _NET_BOND_ALB_H +#define _NET_BOND_ALB_H #include @@ -177,5 +177,5 @@ int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev); void bond_alb_monitor(struct work_struct *); int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr); void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id); -#endif /* __BOND_ALB_H__ */ +#endif /* _NET_BOND_ALB_H */ diff --git a/drivers/net/bonding/bond_options.h b/include/net/bond_options.h similarity index 97% rename from drivers/net/bonding/bond_options.h rename to include/net/bond_options.h index 17ded5b29176..ea6546d2c946 100644 --- a/drivers/net/bonding/bond_options.h +++ b/include/net/bond_options.h @@ -8,8 +8,8 @@ * (at your option) any later version. */ -#ifndef _BOND_OPTIONS_H -#define _BOND_OPTIONS_H +#ifndef _NET_BOND_OPTIONS_H +#define _NET_BOND_OPTIONS_H #define BOND_OPT_MAX_NAMELEN 32 #define BOND_OPT_VALID(opt) ((opt) < BOND_OPT_LAST) @@ -127,4 +127,4 @@ static inline void __bond_opt_init(struct bond_opt_value *optval, void bond_option_arp_ip_targets_clear(struct bonding *bond); -#endif /* _BOND_OPTIONS_H */ +#endif /* _NET_BOND_OPTIONS_H */ diff --git a/drivers/net/bonding/bonding.h b/include/net/bonding.h similarity index 99% rename from drivers/net/bonding/bonding.h rename to include/net/bonding.h index bfb0b51c081a..983a94b86b95 100644 --- a/drivers/net/bonding/bonding.h +++ b/include/net/bonding.h @@ -12,8 +12,8 @@ * */ -#ifndef _LINUX_BONDING_H -#define _LINUX_BONDING_H +#ifndef _NET_BONDING_H +#define _NET_BONDING_H #include #include @@ -26,9 +26,9 @@ #include #include -#include "bond_3ad.h" -#include "bond_alb.h" -#include "bond_options.h" +#include +#include +#include #define DRV_VERSION "3.7.1" #define DRV_RELDATE "April 27, 2011" @@ -651,4 +651,4 @@ static inline void bond_tx_drop(struct net_device *dev, struct sk_buff *skb) dev_kfree_skb_any(skb); } -#endif /* _LINUX_BONDING_H */ +#endif /* _NET_BONDING_H */ -- 2.34.1