Skip to content

Commit

Permalink
bonding: trivial: style fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Shengju authored and David S. Miller committed Feb 8, 2016
1 parent 0aca737 commit d66bd90
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d66bd90

Please sign in to comment.