mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-15 06:57:08 +00:00
ar71xx/ath79: ag71xx: dont fetch the same var again
tx_size was just declared above and set to BIT(tx->order) Use the declaration instead, which could avoid a pointer deref Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
parent
e773838813
commit
81d0da1186
target/linux
ar71xx/files/drivers/net/ethernet/atheros/ag71xx
ath79/files/drivers/net/ethernet/atheros/ag71xx
@ -298,7 +298,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;
|
||||
|
||||
|
@ -284,7 +284,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…
x
Reference in New Issue
Block a user