Skip to content

Commit d66bd90

Browse files
Zhang Shengjudavem330
authored andcommitted
bonding: trivial: style fixes
remove some redudant brackets, use sizeof(*) instead of sizeof(struct x). Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0aca737 commit d66bd90

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -928,11 +928,10 @@ void bond_select_active_slave(struct bonding *bond)
928928
if (!rv)
929929
return;
930930

931-
if (netif_carrier_ok(bond->dev)) {
931+
if (netif_carrier_ok(bond->dev))
932932
netdev_info(bond->dev, "first active interface up!\n");
933-
} else {
933+
else
934934
netdev_info(bond->dev, "now running without any active interface!\n");
935-
}
936935
}
937936
}
938937

@@ -1178,9 +1177,8 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
11781177
}
11791178
}
11801179

1181-
if (bond_should_deliver_exact_match(skb, slave, bond)) {
1180+
if (bond_should_deliver_exact_match(skb, slave, bond))
11821181
return RX_HANDLER_EXACT;
1183-
}
11841182

11851183
skb->dev = bond->dev;
11861184

@@ -1241,7 +1239,7 @@ static struct slave *bond_alloc_slave(struct bonding *bond)
12411239
{
12421240
struct slave *slave = NULL;
12431241

1244-
slave = kzalloc(sizeof(struct slave), GFP_KERNEL);
1242+
slave = kzalloc(sizeof(*slave), GFP_KERNEL);
12451243
if (!slave)
12461244
return NULL;
12471245

0 commit comments

Comments
 (0)