summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_procfs.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2014-05-12 09:08:43 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-14 20:09:15 +0200
commit3fdddd859af235119bdfb09ccc886fe48b97fc72 (patch)
tree11219c41e24c2d5344308d1a5e5b67aa27adb705 /drivers/net/bonding/bond_procfs.c
parentsh_eth: replace devm_kzalloc() with devm_kmalloc_array() (diff)
downloadlinux-3fdddd859af235119bdfb09ccc886fe48b97fc72.tar.xz
linux-3fdddd859af235119bdfb09ccc886fe48b97fc72.zip
bonding: alloc the structure ad_info dynamically in per slave
The struct ad_slave_info is very huge, and only be used for 802.3ad mode, so alloc the structure dynamically could save 356 Bits for every slave in non 802.3ad mode. Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Acked-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_procfs.c')
-rw-r--r--drivers/net/bonding/bond_procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 013fdd0f45e9..6a261c85fd5d 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -190,7 +190,7 @@ static void bond_info_show_slave(struct seq_file *seq,
if (bond->params.mode == BOND_MODE_8023AD) {
const struct aggregator *agg
- = SLAVE_AD_INFO(slave).port.aggregator;
+ = SLAVE_AD_INFO(slave)->port.aggregator;
if (agg)
seq_printf(seq, "Aggregator ID: %d\n",