[PATCH] net: qlcnic: Deletion of unnecessary memset

Subsystems: networking drivers, qlogic qlcnic (1/10)gb ethernet driver, the rest

STALE4117d

3 messages, 3 authors, 2015-07-16 · open the first message on its own page

[PATCH] net: qlcnic: Deletion of unnecessary memset

From: Christophe JAILLET <hidden>
Date: 2015-07-13 19:52:16

There is no need to memset memory allocated with vzalloc.

Signed-off-by: Christophe JAILLET <redacted>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 2f6cc42..7dbab3c 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2403,7 +2403,6 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter *adapter,
 			qlcnic_free_tx_rings(adapter);
 			return -ENOMEM;
 		}
-		memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
 		tx_ring->cmd_buf_arr = cmd_buf_arr;
 		spin_lock_init(&tx_ring->tx_clean_lock);
 	}
-- 
2.1.4

RE: [PATCH] net: qlcnic: Deletion of unnecessary memset

From: Shahed Shaikh <hidden>
Date: 2015-07-14 08:48:19

quoted hunk
-----Original Message-----
From: Christophe JAILLET [mailto:christophe.jaillet@wanadoo.fr]
Sent: Tuesday, July 14, 2015 1:22 AM
To: Shahed Shaikh; Dept-GE Linux NIC Dev
Cc: netdev; linux-kernel; kernel-janitors@vger.kernel.org; Christophe JAILLET
Subject: [PATCH] net: qlcnic: Deletion of unnecessary memset

There is no need to memset memory allocated with vzalloc.

Signed-off-by: Christophe JAILLET <redacted>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 2f6cc42..7dbab3c 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2403,7 +2403,6 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter
*adapter,
 			qlcnic_free_tx_rings(adapter);
 			return -ENOMEM;
 		}
-		memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
 		tx_ring->cmd_buf_arr = cmd_buf_arr;
 		spin_lock_init(&tx_ring->tx_clean_lock);
 	}
Acked-by: Shahed Shaikh <redacted>

Thanks,
Shahed

Re: [PATCH] net: qlcnic: Deletion of unnecessary memset

From: David Miller <davem@davemloft.net>
Date: 2015-07-16 00:20:49

From: Christophe JAILLET <redacted>
Date: Mon, 13 Jul 2015 21:51:38 +0200
There is no need to memset memory allocated with vzalloc.

Signed-off-by: Christophe JAILLET <redacted>
Applied and queued up for -stable, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help