summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-02-03 02:02:32 +0000
committerDavid S. Miller <davem@davemloft.net>2016-02-08 10:45:42 -0500
commitd66bd9050bba153c35736e53b8a3ddbff328adc5 (patch)
treedc0e6fc4d7b8332d37e98b998c3c9233ce4b776c
parent0aca737d4623b7b791b4b1e5f9b015fff5f7180c (diff)
downloadlinux-d66bd9050bba153c35736e53b8a3ddbff328adc5.tar.bz2
bonding: trivial: style fixes
remove some redudant brackets, use sizeof(*) instead of sizeof(struct x). Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_main.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7c9eb6704a7d..705cb0198faa 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -928,11 +928,10 @@ void bond_select_active_slave(struct bonding *bond)
if (!rv)
return;
- if (netif_carrier_ok(bond->dev)) {
+ if (netif_carrier_ok(bond->dev))
netdev_info(bond->dev, "first active interface up!\n");
- } else {
+ else
netdev_info(bond->dev, "now running without any active interface!\n");
- }
}
}
@@ -1178,9 +1177,8 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
}
}
- if (bond_should_deliver_exact_match(skb, slave, bond)) {
+ if (bond_should_deliver_exact_match(skb, slave, bond))
return RX_HANDLER_EXACT;
- }
skb->dev = bond->dev;
@@ -1241,7 +1239,7 @@ static struct slave *bond_alloc_slave(struct bonding *bond)
{
struct slave *slave = NULL;
- slave = kzalloc(sizeof(struct slave), GFP_KERNEL);
+ slave = kzalloc(sizeof(*slave), GFP_KERNEL);
if (!slave)
return NULL;