Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5910650ybl; Sun, 22 Dec 2019 17:53:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyD3o1WAizn9LIcjHIH14gLhCgi1u5CnBfZ7kaaOFlrKj6jWpCKlpaOFuSpO1mk5yFBlxUh X-Received: by 2002:a05:6830:1f95:: with SMTP id v21mr21455152otr.325.1577066002643; Sun, 22 Dec 2019 17:53:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577066002; cv=none; d=google.com; s=arc-20160816; b=o/aabOXp/+5IPD2CwHPthO6J/UWcHpgOSswjw5FRV1HuiJ1UyVdD8jeBFSEbSmVWmm hdsLMg4vrgY2t8Yyl1KRiOJycUUFivBZQuyzmfbXT9URwXfp36pvtScdaVZj1z6G0ees GSVqqHcegoYxYoBBQR/HROnUCtf25m7SOHnxGp0rReFDogYoWe2Ix+ahcHRBfGU8vgNY B2C7MKRYMREQ/pklOu5omy2TMt5rwXhPHqC5POaGI5IeiJqwnnUMu6EfKbj/rYy9Ox1n 0hf/GLHmMDbs61yMBtPwGwmJdVFplR3SPlmnG+80NiUXiKT+FAytFn6o5hC9trhAb3IZ ZaSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=HUwknnAdOfoVhUkNIQedQdBI0twBN47fLwFDdikHxoo=; b=CcBV7dXgiqKOSwkGtszMtOXfFgB3C6VxfWnhlAsLMY5JOrRr3HxlYWRRN6dtWusyYZ q8PB1+wj4pcGEbZtmY77ZieHmT2HWtzeFUQuUNynAHJTLpdvGztI9Gj1N2KXmqsR5WH7 9g8H/jpkQwO1xqq731L6JxoFeE31nJZ1tywkWqgJVB10RC7HhiiBMcm2CSy0q2p5ZPep VUa5KLMaWyDWM6IqD3o6c1rzoOI5Lnb2TU/9piRchJyuWjiN9UmQqKC3R7AbfsAEWUH6 UxPsadBBJGy0PBDvQ2Qv3Rtu6pJgR6Bbngh7USwU7qjclZYx+Qs/S7JO+KrBZ0pbMKPI e3ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si6888022otu.301.2019.12.22.17.53.10; Sun, 22 Dec 2019 17:53:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfLWBwc (ORCPT + 99 others); Sun, 22 Dec 2019 20:52:32 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:64188 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbfLWBwc (ORCPT ); Sun, 22 Dec 2019 20:52:32 -0500 Received: from mse-fl2.zte.com.cn (unknown [10.30.14.239]) by Forcepoint Email with ESMTPS id 8EF11587128DA7A88804; Mon, 23 Dec 2019 09:52:30 +0800 (CST) Received: from notes_smtp.zte.com.cn (notessmtp.zte.com.cn [10.30.1.239]) by mse-fl2.zte.com.cn with ESMTP id xBN1q0Wb032782; Mon, 23 Dec 2019 09:52:00 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019122309520245-1467735 ; Mon, 23 Dec 2019 09:52:02 +0800 From: Yi Wang To: sudeep.dutt@intel.com Cc: ashutosh.dixit@intel.com, arnd@arndb.de, gregkh@linuxfoundation.org, vincent.whitchurch@axis.com, alexios.zavras@intel.com, tglx@linutronix.de, allison@lohutok.net, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn, up2wing@gmail.com, wang.liang82@zte.com.cn, Huang Zijiang Subject: [PATCH] misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO. Date: Mon, 23 Dec 2019 09:51:58 +0800 Message-Id: <1577065918-25513-1-git-send-email-wang.yi59@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-12-23 09:52:02, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-12-23 09:52:01, Serialize complete at 2019-12-23 09:52:01 X-MAIL: mse-fl2.zte.com.cn xBN1q0Wb032782 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huang Zijiang Use kzalloc instead of manually setting kmalloc with flag GFP_ZERO since kzalloc sets allocated memory to zero. Signed-off-by: Huang Zijiang Signed-off-by: Yi Wang --- 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