netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: bcmgenet: Remove the unused function
@ 2022-12-09  3:37 Jiapeng Chong
  2022-12-09  3:41 ` Florian Fainelli
  2022-12-10  3:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2022-12-09  3:37 UTC (permalink / raw)
  To: opendmb
  Cc: f.fainelli, bcm-kernel-feedback-list, davem, edumazet, kuba,
	pabeni, netdev, linux-kernel, Jiapeng Chong, Abaci Robot

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>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index a8ce8d0cf9c4..21973046b12b 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -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 | \
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: bcmgenet: Remove the unused function
  2022-12-09  3:37 [PATCH] net: bcmgenet: Remove the unused function Jiapeng Chong
@ 2022-12-09  3:41 ` Florian Fainelli
  2022-12-10  3:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-12-09  3:41 UTC (permalink / raw)
  To: Jiapeng Chong, opendmb
  Cc: bcm-kernel-feedback-list, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, Abaci Robot



On 12/8/2022 7:37 PM, Jiapeng Chong 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'.
> 
> 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>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: bcmgenet: Remove the unused function
  2022-12-09  3:37 [PATCH] net: bcmgenet: Remove the unused function Jiapeng Chong
  2022-12-09  3:41 ` Florian Fainelli
@ 2022-12-10  3:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-10  3:50 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: opendmb, f.fainelli, bcm-kernel-feedback-list, davem, edumazet,
	kuba, pabeni, netdev, linux-kernel, abaci

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-10  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-09  3:37 [PATCH] net: bcmgenet: Remove the unused function Jiapeng Chong
2022-12-09  3:41 ` Florian Fainelli
2022-12-10  3:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).