octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
Subsystems (3)
PATCH 1/1 octeon_ep: remove redundant memset in octep_setup_pfvf_mbox()
vzalloc() returns zeroed memory, so the memset after the allocation is redundant.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>
--- drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c +0 -1
@@ -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);
Signature · 1 line
2.43.0
Quoted 6 lines · Sang-Heon Jeon
vzalloc()returns zeroed memory, so the memset after the allocation is redundant.No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>
Reviewed-by Xuanqiang Luo<[email protected]> Thanks,
Xuanqiang
Quoted 16 lines
--- drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c +0
-1@@ -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);
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · 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 <[email protected]>[...]
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html