--- zzzz-none-000/linux-3.10.107/drivers/net/bonding/bond_debugfs.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/bonding/bond_debugfs.c 2021-02-04 17:41:59.000000000 +0000 @@ -3,8 +3,8 @@ #include #include -#include "bonding.h" -#include "bond_alb.h" +#include +#include #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_NET_NS) @@ -13,9 +13,7 @@ static struct dentry *bonding_debug_root; -/* - * Show RLB hash table - */ +/* Show RLB hash table */ static int bond_debug_rlb_hash_show(struct seq_file *m, void *v) { struct bonding *bond = m->private; @@ -23,13 +21,13 @@ struct rlb_client_info *client_info; u32 hash_index; - if (bond->params.mode != BOND_MODE_ALB) + if (BOND_MODE(bond) != BOND_MODE_ALB) return 0; seq_printf(m, "SourceIP DestinationIP " "Destination MAC DEV\n"); - spin_lock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock)); + spin_lock_bh(&bond->mode_lock); hash_index = bond_info->rx_hashtbl_used_head; for (; hash_index != RLB_NULL_INDEX; @@ -42,7 +40,7 @@ client_info->slave->dev->name); } - spin_unlock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock)); + spin_unlock_bh(&bond->mode_lock); return 0; } @@ -69,8 +67,7 @@ debugfs_create_dir(bond->dev->name, bonding_debug_root); if (!bond->debug_dir) { - pr_warning("%s: Warning: failed to register to debugfs\n", - bond->dev->name); + netdev_warn(bond->dev, "failed to register to debugfs\n"); return; } @@ -98,9 +95,7 @@ if (d) { bond->debug_dir = d; } else { - pr_warning("%s: Warning: failed to reregister, " - "so just unregister old one\n", - bond->dev->name); + netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n"); bond_debug_unregister(bond); } } @@ -110,8 +105,7 @@ bonding_debug_root = debugfs_create_dir("bonding", NULL); if (!bonding_debug_root) { - pr_warning("Warning: Cannot create bonding directory" - " in debugfs\n"); + pr_warn("Warning: Cannot create bonding directory in debugfs\n"); } }