[PATCH] ethernet: liquidio: Remove unnecessary memset

Liao Yuanhong posted 1 patch 1 month, 4 weeks ago
drivers/net/ethernet/cavium/liquidio/octeon_device.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] ethernet: liquidio: Remove unnecessary memset
Posted by Liao Yuanhong 1 month, 4 weeks ago
vzalloc_node() or vzalloc() has already been initialized to full 0 space,
there is no need to use memset() to initialize again.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
 drivers/net/ethernet/cavium/liquidio/octeon_device.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.c b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
index 1753bb87dfbd..4d7d7a4da92e 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
@@ -893,7 +893,6 @@ int octeon_setup_instr_queues(struct octeon_device *oct)
 			vzalloc(sizeof(struct octeon_instr_queue));
 	if (!oct->instr_queue[0])
 		return 1;
-	memset(oct->instr_queue[0], 0, sizeof(struct octeon_instr_queue));
 	oct->instr_queue[0]->q_index = 0;
 	oct->instr_queue[0]->app_ctx = (void *)(size_t)0;
 	oct->instr_queue[0]->ifidx = 0;
-- 
2.34.1
Re: [PATCH] ethernet: liquidio: Remove unnecessary memset
Posted by Simon Horman 1 month, 4 weeks ago
On Thu, Aug 07, 2025 at 08:40:53PM +0800, Liao Yuanhong wrote:
> vzalloc_node() or vzalloc() has already been initialized to full 0 space,
> there is no need to use memset() to initialize again.
> 
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>

Looking over git, it seems that the last non-trivial change this driver
received was the following in 2018.

8bf6edcd96fc ("liquidio: Removed droq lock")

And moreover this driver is marked as Oprhaned.

So I would say that the churn of cleanup patches outweighs any benefit
to this driver. Let's leave it be.

-- 
pw-bot: cr