net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 31 Jul 2019 08:06:38 +0000 (10:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Jul 2019 15:38:17 +0000 (08:38 -0700)
A few lines above, we have:
   tx_size = BIT(tx->order);

So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
'rx->descs_dma' are computed below.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/ag71xx.c

index 77542bd..40a8717 100644 (file)
@@ -1148,7 +1148,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
                return -ENOMEM;
        }
 
-       rx->buf = &tx->buf[BIT(tx->order)];
+       rx->buf = &tx->buf[tx_size];
        rx->descs_cpu = ((void *)tx->descs_cpu) + tx_size * AG71XX_DESC_SIZE;
        rx->descs_dma = tx->descs_dma + tx_size * AG71XX_DESC_SIZE;