Skip to content

Commit 4d7b448

Browse files
Colin Ian Kingdavem330
authored andcommitted
net: amd8111e: remove redundant duplicated if statement
There are two identical nested if statements, the second is redundant and can be removed. Also clean up white space formatting. Cleans up cppcheck warning: drivers/net/ethernet/amd/amd8111e.c:1080: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 22e15b6 commit 4d7b448

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,16 +1074,12 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
10741074
amd8111e_set_coalesce(dev,TX_INTR_COAL);
10751075
coal_conf->tx_coal_type = MEDIUM_COALESCE;
10761076
}
1077-
1078-
}
1079-
else if(tx_pkt_size >= 1024){
1080-
if (tx_pkt_size >= 1024){
1081-
if(coal_conf->tx_coal_type != HIGH_COALESCE){
1082-
coal_conf->tx_timeout = 4;
1083-
coal_conf->tx_event_count = 8;
1084-
amd8111e_set_coalesce(dev,TX_INTR_COAL);
1085-
coal_conf->tx_coal_type = HIGH_COALESCE;
1086-
}
1077+
} else if (tx_pkt_size >= 1024) {
1078+
if (coal_conf->tx_coal_type != HIGH_COALESCE) {
1079+
coal_conf->tx_timeout = 4;
1080+
coal_conf->tx_event_count = 8;
1081+
amd8111e_set_coalesce(dev, TX_INTR_COAL);
1082+
coal_conf->tx_coal_type = HIGH_COALESCE;
10871083
}
10881084
}
10891085
}

0 commit comments

Comments
 (0)