Skip to content

Commit 28d3950

Browse files
Jiapeng Chongkuba-moo
authored andcommitted
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 <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2b53d86 commit 28d3950

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,6 @@ static inline void dmadesc_set(struct bcmgenet_priv *priv,
117117
dmadesc_set_length_status(priv, d, val);
118118
}
119119

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-
138120
#define GENET_VER_FMT "%1d.%1d EPHY: 0x%04x"
139121

140122
#define GENET_MSG_DEFAULT (NETIF_MSG_DRV | NETIF_MSG_PROBE | \

0 commit comments

Comments
 (0)