diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2019-07-31 10:06:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-31 08:38:17 -0700 |
commit | a9d41e7b8b1fe43c0beeab9a45d4c886a5e4ee85 (patch) | |
tree | b78940745c2dff3c66ecfe5059045b5dd446bb95 | |
parent | 5133f36cef46b906d40b76d5f71640f5b3dae0c3 (diff) | |
download | linux-a9d41e7b8b1fe43c0beeab9a45d4c886a5e4ee85.tar.bz2 |
net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
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>
-rw-r--r-- | drivers/net/ethernet/atheros/ag71xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 77542bd1e5bd..40a8717f51b1 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -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; |