[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1577065918-25513-1-git-send-email-wang.yi59@zte.com.cn>
Date: Mon, 23 Dec 2019 09:51:58 +0800
From: Yi Wang <wang.yi59@....com.cn>
To: sudeep.dutt@...el.com
Cc: ashutosh.dixit@...el.com, arnd@...db.de,
gregkh@...uxfoundation.org, vincent.whitchurch@...s.com,
alexios.zavras@...el.com, tglx@...utronix.de, allison@...utok.net,
linux-kernel@...r.kernel.org, xue.zhihong@....com.cn,
wang.yi59@....com.cn, up2wing@...il.com, wang.liang82@....com.cn,
Huang Zijiang <huang.zijiang@....com.cn>
Subject: [PATCH] misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO.
From: Huang Zijiang <huang.zijiang@....com.cn>
Use kzalloc instead of manually setting kmalloc
with flag GFP_ZERO since kzalloc sets allocated memory
to zero.
Signed-off-by: Huang Zijiang <huang.zijiang@....com.cn>
Signed-off-by: Yi Wang <wang.yi59@....com.cn>
---
drivers/misc/mic/host/mic_boot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mic/host/mic_boot.c b/drivers/misc/mic/host/mic_boot.c
index 7335759..c1f87a4 100644
--- a/drivers/misc/mic/host/mic_boot.c
+++ b/drivers/misc/mic/host/mic_boot.c
@@ -137,7 +137,7 @@ static void *__mic_dma_alloc(struct device *dev, size_t size,
struct scif_hw_dev *scdev = dev_get_drvdata(dev);
struct mic_device *mdev = scdev_to_mdev(scdev);
dma_addr_t tmp;
- void *va = kmalloc(size, gfp | __GFP_ZERO);
+void *va = kzalloc(size, gfp);
if (va) {
tmp = mic_map_single(mdev, va, size);
--
1.9.1
Powered by blists - more mailing lists