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>
This commit is contained in:
committed by
David S. Miller
parent
8243c7ed6d
commit
0d1af4fa71
@@ -843,11 +843,10 @@ static int init_tx_pools(struct net_device *netdev)
|
|||||||
* allocation, release_tx_pools() will know how many to look for.
|
* allocation, release_tx_pools() will know how many to look for.
|
||||||
*/
|
*/
|
||||||
adapter->num_active_tx_pools = num_pools;
|
adapter->num_active_tx_pools = num_pools;
|
||||||
|
|
||||||
for (i = 0; i < num_pools; i++) {
|
|
||||||
buff_size = adapter->req_mtu + VLAN_HLEN;
|
buff_size = adapter->req_mtu + VLAN_HLEN;
|
||||||
buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
|
buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
|
||||||
|
|
||||||
|
for (i = 0; i < num_pools; i++) {
|
||||||
dev_dbg(dev, "Init tx pool %d [%llu, %llu]\n",
|
dev_dbg(dev, "Init tx pool %d [%llu, %llu]\n",
|
||||||
i, adapter->req_tx_entries_per_subcrq, buff_size);
|
i, adapter->req_tx_entries_per_subcrq, buff_size);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user