Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
@ 2026-09-01 11:09 Sang-Heon Jeon
  2026-09-01 13:04 ` luoxuanqiang
  2026-09-03 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Sang-Heon Jeon @ 2026-09-01 11:09 UTC (permalink / raw)
  To: Veerasenareddy Burru, Sathesh Edara, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-kernel, netdev

vzalloc() returns zeroed memory, so the memset after the allocation is
redundant.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
index 0867fab61b19..e4175d5bdb3b 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
@@ -274,7 +274,6 @@ int octep_setup_pfvf_mbox(struct octep_device *oct)
 		if (!oct->mbox[ring])
 			goto free_mbox;
 
-		memset(oct->mbox[ring], 0, sizeof(struct octep_mbox));
 		memset(&oct->vf_info[i], 0, sizeof(struct octep_pfvf_info));
 		mutex_init(&oct->mbox[ring]->lock);
 		INIT_WORK(&oct->mbox[ring]->wk.work, octep_pfvf_mbox_work);
-- 
2.43.0


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

* Re: [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
  2026-09-01 11:09 [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox() Sang-Heon Jeon
@ 2026-09-01 13:04 ` luoxuanqiang
  2026-09-03 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: luoxuanqiang @ 2026-09-01 13:04 UTC (permalink / raw)
  To: Sang-Heon Jeon
  Cc: linux-kernel, netdev, Veerasenareddy Burru, Sathesh Edara,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni


在 2026/9/1 19:09, Sang-Heon Jeon 写道:
> vzalloc() returns zeroed memory, so the memset after the allocation is
> redundant.
>
> No functional change.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Reviewed-by: Xuanqiang Luo<luoxuanqiang@kylinos.cn> Thanks,
Xuanqiang

> ---
>   drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> index 0867fab61b19..e4175d5bdb3b 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> @@ -274,7 +274,6 @@ int octep_setup_pfvf_mbox(struct octep_device *oct)
>   		if (!oct->mbox[ring])
>   			goto free_mbox;
>   
> -		memset(oct->mbox[ring], 0, sizeof(struct octep_mbox));
>   		memset(&oct->vf_info[i], 0, sizeof(struct octep_pfvf_info));
>   		mutex_init(&oct->mbox[ring]->lock);
>   		INIT_WORK(&oct->mbox[ring]->wk.work, octep_pfvf_mbox_work);

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

* Re: [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
  2026-09-01 11:09 [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox() Sang-Heon Jeon
  2026-09-01 13:04 ` luoxuanqiang
@ 2026-09-03 11:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-03 11:00 UTC (permalink / raw)
  To: Sang-Heon Jeon
  Cc: vburru, sedara, andrew+netdev, davem, edumazet, kuba, pabeni,
	linux-kernel, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue,  1 Sep 2026 20:09:11 +0900 you wrote:
> vzalloc() returns zeroed memory, so the memset after the allocation is
> redundant.
> 
> No functional change.
> 
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
    https://git.kernel.org/netdev/net-next/c/b35d3d2fae30

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:[~2026-09-03 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 11:09 [PATCH net-next] octeon_ep: remove redundant memset in octep_setup_pfvf_mbox() Sang-Heon Jeon
2026-09-01 13:04 ` luoxuanqiang
2026-09-03 11:00 ` 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