Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: bcmgenet: Remove the unused function

The function dmadesc_get_addr() is defined in the bcmgenet.c file, but
not called elsewhere, so remove this unused function.

drivers/net/ethernet/broadcom/genet/bcmgenet.c:120:26: warning: unused function 'dmadesc_get_addr'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3401
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221209033723.32452-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jiapeng Chong and committed by
Jakub Kicinski
28d39503 2b53d869

-18
-18
drivers/net/ethernet/broadcom/genet/bcmgenet.c
··· 117 117 dmadesc_set_length_status(priv, d, val); 118 118 } 119 119 120 - static inline dma_addr_t dmadesc_get_addr(struct bcmgenet_priv *priv, 121 - void __iomem *d) 122 - { 123 - dma_addr_t addr; 124 - 125 - addr = bcmgenet_readl(d + DMA_DESC_ADDRESS_LO); 126 - 127 - /* Register writes to GISB bus can take couple hundred nanoseconds 128 - * and are done for each packet, save these expensive writes unless 129 - * the platform is explicitly configured for 64-bits/LPAE. 130 - */ 131 - #ifdef CONFIG_PHYS_ADDR_T_64BIT 132 - if (priv->hw_params->flags & GENET_HAS_40BITS) 133 - addr |= (u64)bcmgenet_readl(d + DMA_DESC_ADDRESS_HI) << 32; 134 - #endif 135 - return addr; 136 - } 137 - 138 120 #define GENET_VER_FMT "%1d.%1d EPHY: 0x%04x" 139 121 140 122 #define GENET_MSG_DEFAULT (NETIF_MSG_DRV | NETIF_MSG_PROBE | \