mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 13:46:43 +07:00
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 <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
22e15b6f9c
commit
4d7b44833e
@ -1074,16 +1074,12 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
|
||||
amd8111e_set_coalesce(dev,TX_INTR_COAL);
|
||||
coal_conf->tx_coal_type = MEDIUM_COALESCE;
|
||||
}
|
||||
|
||||
}
|
||||
else if(tx_pkt_size >= 1024){
|
||||
if (tx_pkt_size >= 1024){
|
||||
if(coal_conf->tx_coal_type != HIGH_COALESCE){
|
||||
coal_conf->tx_timeout = 4;
|
||||
coal_conf->tx_event_count = 8;
|
||||
amd8111e_set_coalesce(dev,TX_INTR_COAL);
|
||||
coal_conf->tx_coal_type = HIGH_COALESCE;
|
||||
}
|
||||
} else if (tx_pkt_size >= 1024) {
|
||||
if (coal_conf->tx_coal_type != HIGH_COALESCE) {
|
||||
coal_conf->tx_timeout = 4;
|
||||
coal_conf->tx_event_count = 8;
|
||||
amd8111e_set_coalesce(dev, TX_INTR_COAL);
|
||||
coal_conf->tx_coal_type = HIGH_COALESCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user