From c04914af6861d62df303aeedbbe554972ce4e736 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 15 Nov 2010 11:12:25 +0000 Subject: drivers/net/bonding: Remove unnecessary casts of netdev_priv Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- drivers/net/bonding/bonding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/bonding/bonding.h') diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 4eedb12df6ca..ad3ae46a4c01 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) return NULL; } - return (struct bonding *)netdev_priv(slave->dev->master); + return netdev_priv(slave->dev->master); } static inline bool bond_is_lb(const struct bonding *bond) -- cgit v1.2.3 From f073c7ca29a4a7e14060d9d3ddf09bfbb7cd9cc0 Mon Sep 17 00:00:00 2001 From: Taku Izumi Date: Thu, 9 Dec 2010 15:17:13 +0000 Subject: bonding: add the debugfs facility to the bonding driver This patch provides the debugfs facility to the bonding driver. The "bonding" directory is created in the debugfs root and directories of each bonding interface (like bond0, bond1...) are created in that. # mount -t debugfs none /sys/kernel/debug # ls /sys/kernel/debug/bonding bond0 bond1 Signed-off-by: Taku Izumi Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller --- drivers/net/bonding/bonding.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/net/bonding/bonding.h') diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index ad3ae46a4c01..03710f8f5c49 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -259,6 +259,10 @@ struct bonding { #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) struct in6_addr master_ipv6; #endif +#ifdef CONFIG_DEBUG_FS + /* debugging suport via debugfs */ + struct dentry *debug_dir; +#endif /* CONFIG_DEBUG_FS */ }; /** @@ -380,6 +384,11 @@ void bond_select_active_slave(struct bonding *bond); void bond_change_active_slave(struct bonding *bond, struct slave *new_active); void bond_register_arp(struct bonding *); void bond_unregister_arp(struct bonding *); +void bond_create_debugfs(void); +void bond_destroy_debugfs(void); +void bond_debug_register(struct bonding *bond); +void bond_debug_unregister(struct bonding *bond); +void bond_debug_reregister(struct bonding *bond); struct bond_net { struct net * net; /* Associated network namespace */ -- cgit v1.2.3