diff options
author | Sukadev Bhattiprolu <sukadev@linux.ibm.com> | 2021-09-15 05:52:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-15 12:12:23 +0200 |
commit | 0d1af4fa71241104b8959f83974875dc52bc129f (patch) | |
tree | ec00559d6f973818ef3d6b78412f73461402946d /drivers/net/ethernet/ibm | |
parent | ibmvnic: Use/rename local vars in init_tx_pools (diff) | |
download | linux-0d1af4fa71241104b8959f83974875dc52bc129f.tar.xz linux-0d1af4fa71241104b8959f83974875dc52bc129f.zip |
ibmvnic: init_tx_pools move loop-invariant code
In init_tx_pools() move some loop-invariant code out of the loop.
Reviewed-by: Rick Lindsley <ricklind@linux.vnet.ibm.com>
Reviewed-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 97041b319beb..bb9b8aec9c9b 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -843,11 +843,10 @@ static int init_tx_pools(struct net_device *netdev) * allocation, release_tx_pools() will know how many to look for. */ adapter->num_active_tx_pools = num_pools; + buff_size = adapter->req_mtu + VLAN_HLEN; + buff_size = ALIGN(buff_size, L1_CACHE_BYTES); for (i = 0; i < num_pools; i++) { - buff_size = adapter->req_mtu + VLAN_HLEN; - buff_size = ALIGN(buff_size, L1_CACHE_BYTES); - dev_dbg(dev, "Init tx pool %d [%llu, %llu]\n", i, adapter->req_tx_entries_per_subcrq, buff_size); |