Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74714
b: refs/heads/master
c: 16cd016
h: refs/heads/master
v: v3
  • Loading branch information
Wagner Ferenc authored and Jeff Garzik committed Dec 7, 2007
1 parent a6e9ad5 commit b9052b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7bd4650895137760f6c686d06ca2bc174e3c861c
refs/heads/master: 16cd0160d5e7e22c2818b30bf1a1d4c262a8df8a
25 changes: 4 additions & 21 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,11 @@ static ssize_t bonding_show_xmit_hash(struct device *d,
struct device_attribute *attr,
char *buf)
{
int count;
int count = 0;
struct bonding *bond = to_bond(d);

if ((bond->params.mode != BOND_MODE_XOR) &&
(bond->params.mode != BOND_MODE_8023AD)) {
// Not Applicable
count = sprintf(buf, "NA\n");
} else {
if ((bond->params.mode == BOND_MODE_XOR) ||
(bond->params.mode == BOND_MODE_8023AD)) {
count = sprintf(buf, "%s %d\n",
xmit_hashtype_tbl[bond->params.xmit_policy].modename,
bond->params.xmit_policy);
Expand Down Expand Up @@ -1079,8 +1076,6 @@ static ssize_t bonding_show_primary(struct device *d,

if (bond->primary_slave)
count = sprintf(buf, "%s\n", bond->primary_slave->dev->name);
else
count = sprintf(buf, "\n");

return count;
}
Expand Down Expand Up @@ -1186,16 +1181,14 @@ static ssize_t bonding_show_active_slave(struct device *d,
{
struct slave *curr;
struct bonding *bond = to_bond(d);
int count;
int count = 0;

read_lock(&bond->curr_slave_lock);
curr = bond->curr_active_slave;
read_unlock(&bond->curr_slave_lock);

if (USES_PRIMARY(bond->params.mode) && curr)
count = sprintf(buf, "%s\n", curr->dev->name);
else
count = sprintf(buf, "\n");
return count;
}

Expand Down Expand Up @@ -1309,8 +1302,6 @@ static ssize_t bonding_show_ad_aggregator(struct device *d,
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.aggregator_id);
}
else
count = sprintf(buf, "\n");

return count;
}
Expand All @@ -1331,8 +1322,6 @@ static ssize_t bonding_show_ad_num_ports(struct device *d,
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0: ad_info.ports);
}
else
count = sprintf(buf, "\n");

return count;
}
Expand All @@ -1353,8 +1342,6 @@ static ssize_t bonding_show_ad_actor_key(struct device *d,
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.actor_key);
}
else
count = sprintf(buf, "\n");

return count;
}
Expand All @@ -1375,8 +1362,6 @@ static ssize_t bonding_show_ad_partner_key(struct device *d,
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.partner_key);
}
else
count = sprintf(buf, "\n");

return count;
}
Expand All @@ -1401,8 +1386,6 @@ static ssize_t bonding_show_ad_partner_mac(struct device *d,
print_mac(mac, ad_info.partner_system));
}
}
else
count = sprintf(buf, "\n");

return count;
}
Expand Down

0 comments on commit b9052b5

Please sign in to comment.