mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
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>
This commit is contained in:
parent
5133f36cef
commit
a9d41e7b8b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user