Skip to content

Commit 4d64269

Browse files
LorenzoBianconidavem330
authored andcommitted
net: ethernet: mtk_eth_soc: convert scratch_ring pointer to void
Simplify the code converting scratch_ring pointer to void Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7173eca commit 4d64269

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ static int mtk_init_fq_dma(struct mtk_eth *eth)
893893
for (i = 0; i < cnt; i++) {
894894
struct mtk_tx_dma_v2 *txd;
895895

896-
txd = (void *)eth->scratch_ring + i * soc->txrx.txd_size;
896+
txd = eth->scratch_ring + i * soc->txrx.txd_size;
897897
txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE;
898898
if (i < cnt - 1)
899899
txd->txd2 = eth->phy_scratch_ring +

drivers/net/ethernet/mediatek/mtk_eth_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ struct mtk_eth {
10331033
struct mtk_rx_ring rx_ring_qdma;
10341034
struct napi_struct tx_napi;
10351035
struct napi_struct rx_napi;
1036-
struct mtk_tx_dma *scratch_ring;
1036+
void *scratch_ring;
10371037
dma_addr_t phy_scratch_ring;
10381038
void *scratch_head;
10391039
struct clk *clks[MTK_CLK_MAX];

0 commit comments

Comments
 (0)