Skip to contentSkip to conversation

net: bcmgenet: Remove the unused function

PATCH Applied Jiapeng Chong 3 participants 3 messages Dec 9, 2022 – Dec 10, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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'.

---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 ------------------
 1 file changed, 18 deletions(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +0 -18
index a8ce8d0cf9c4..21973046b12b 100644
@@ -117,24 +117,6 @@ static inline void dmadesc_set(struct bcmgenet_priv *priv,
 	dmadesc_set_length_status(priv, d, val);
 }
 
-static inline dma_addr_t dmadesc_get_addr(struct bcmgenet_priv *priv,
-					  void __iomem *d)
-{
-	dma_addr_t addr;
-
-	addr = bcmgenet_readl(d + DMA_DESC_ADDRESS_LO);
-
-	/* Register writes to GISB bus can take couple hundred nanoseconds
-	 * and are done for each packet, save these expensive writes unless
-	 * the platform is explicitly configured for 64-bits/LPAE.
-	 */
-#ifdef CONFIG_PHYS_ADDR_T_64BIT
-	if (priv->hw_params->flags & GENET_HAS_40BITS)
-		addr |= (u64)bcmgenet_readl(d + DMA_DESC_ADDRESS_HI) << 32;
-#endif
-	return addr;
-}
-
 #define GENET_VER_FMT	"%1d.%1d EPHY: 0x%04x"
 
 #define GENET_MSG_DEFAULT	(NETIF_MSG_DRV | NETIF_MSG_PROBE | \
Signature · 1 line
2.20.1.7.g153144c
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jiapeng Chong

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'.

Signature · 1 line
Florian
#2 lore raw
In reply to Jiapeng Chong
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Fri, 9 Dec 2022 11:37:23 +0800 you wrote:

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'.

[...]

Here is the summary with links:
- net: bcmgenet: Remove the unused function

    https://git.kernel.org/netdev/net-next/c/28d39503e4e0

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html