Commit 4d642690 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by David S. Miller

net: ethernet: mtk_eth_soc: convert scratch_ring pointer to void

Simplify the code converting scratch_ring pointer to void
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7173eca8
...@@ -893,7 +893,7 @@ static int mtk_init_fq_dma(struct mtk_eth *eth) ...@@ -893,7 +893,7 @@ static int mtk_init_fq_dma(struct mtk_eth *eth)
for (i = 0; i < cnt; i++) { for (i = 0; i < cnt; i++) {
struct mtk_tx_dma_v2 *txd; struct mtk_tx_dma_v2 *txd;
txd = (void *)eth->scratch_ring + i * soc->txrx.txd_size; txd = eth->scratch_ring + i * soc->txrx.txd_size;
txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE; txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE;
if (i < cnt - 1) if (i < cnt - 1)
txd->txd2 = eth->phy_scratch_ring + txd->txd2 = eth->phy_scratch_ring +
......
...@@ -1033,7 +1033,7 @@ struct mtk_eth { ...@@ -1033,7 +1033,7 @@ struct mtk_eth {
struct mtk_rx_ring rx_ring_qdma; struct mtk_rx_ring rx_ring_qdma;
struct napi_struct tx_napi; struct napi_struct tx_napi;
struct napi_struct rx_napi; struct napi_struct rx_napi;
struct mtk_tx_dma *scratch_ring; void *scratch_ring;
dma_addr_t phy_scratch_ring; dma_addr_t phy_scratch_ring;
void *scratch_head; void *scratch_head;
struct clk *clks[MTK_CLK_MAX]; struct clk *clks[MTK_CLK_MAX];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment