netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] libcxgb: replace vmalloc and memset with vzalloc
@ 2018-07-19 14:18 YueHaibing
  2018-07-21 23:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-07-19 14:18 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, netdev, YueHaibing

Use vzalloc instead of the vmalloc, memset combo

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
index 0ed1616..74849be 100644
--- a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
+++ b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
@@ -412,12 +412,10 @@ int cxgbi_ppm_init(void **ppm_pp, struct net_device *ndev,
 			ppmax * (sizeof(struct cxgbi_ppod_data)) +
 			ppod_bmap_size * sizeof(unsigned long);
 
-	ppm = vmalloc(alloc_sz);
+	ppm = vzalloc(alloc_sz);
 	if (!ppm)
 		goto release_ppm_pool;
 
-	memset(ppm, 0, alloc_sz);
-
 	ppm->ppod_bmap = (unsigned long *)(&ppm->ppod_data[ppmax]);
 
 	if ((ppod_bmap_size >> 3) > (ppmax - ppmax_pool)) {
-- 
2.7.0

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

* Re: [PATCH net-next] libcxgb: replace vmalloc and memset with vzalloc
  2018-07-19 14:18 [PATCH net-next] libcxgb: replace vmalloc and memset with vzalloc YueHaibing
@ 2018-07-21 23:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-21 23:33 UTC (permalink / raw)
  To: yuehaibing; +Cc: linux-kernel, netdev

From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 19 Jul 2018 22:18:27 +0800

> Use vzalloc instead of the vmalloc, memset combo
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

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

end of thread, other threads:[~2018-07-21 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 14:18 [PATCH net-next] libcxgb: replace vmalloc and memset with vzalloc YueHaibing
2018-07-21 23:33 ` David Miller

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).