Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6319333ybl; Mon, 23 Dec 2019 04:05:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwtJlYKJs4OAwSVVulev3sUvEUspa7UO6AFQeQon2QBXH6TEO+p8xG8gfJ4wRKR1al7WAyz X-Received: by 2002:a9d:5784:: with SMTP id q4mr13674622oth.278.1577102726665; Mon, 23 Dec 2019 04:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577102726; cv=none; d=google.com; s=arc-20160816; b=OxwyCStDQ8jlM6KUjTrI+SdJ9m7uYP8uohrhnDWhK3w2W9OtM7UlQwJvx9cyf0qtSZ R/Pa0NrUw1KXE6fXevZwE2OORwTgCZRst3PFzX3I+fQrD+ZHMYtzeg3e6FK7w3kBRwMR S/hy8iigoPGFPYOfpnUFCaDpGAOaQx+33cpIn9xxvapi6uy/AOMhkh2QSgaRpgsBnDld lKH+4ti2w/DaYBYdIdJPFb1aJd56Y7oU0XTGpHmFBfmo0CV1DzjREtQT3IXo6Q45UTvr e85C0AivKgC5eVe1MuUGR5fQlRk1LQsT1xZnDXxTcfRFQrUoTFJM8ja+fT52s0qUi5/Y 3ifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7qOKMGklW7gE1nV9s5ebwxDu68liORnKsSiJWWGXTxw=; b=B7kjy70WRaysLSyAWqVrWq0cjIjBY7Aj+ubtHCNFEAHqEvbl5XwFxkq/mLjVOccin9 aeSiaoTcHy3ScIqyUWapddioUuMoYR93BoboQTvgftyy5PGzSpSRYTWAYaNmoN8hlIDO s8SUtkDtdIY3tafwG0sFRYz6b9wosC+zv+zka72T9FJOp/z0QwG4MSiGJPqpnUR42Bo0 VBGlfcZYac5tg173gXwyYd08pmmT0yoyBo6GWlFWUo/GhEwm92BILQuTjeWAzl0lxsjX IREmJCtJJkqrvxjUraXvUHInSuimQuo2zPPJBIVhXx2KdBeUdPWbMoeeFwF4iMv47WNA dRTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PP3Sh8ub; 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 e21si10298595oti.246.2019.12.23.04.05.14; Mon, 23 Dec 2019 04:05:26 -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; dkim=pass header.i=@kernel.org header.s=default header.b=PP3Sh8ub; 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 S1726744AbfLWMEa (ORCPT + 99 others); Mon, 23 Dec 2019 07:04:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:37158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfLWMEa (ORCPT ); Mon, 23 Dec 2019 07:04:30 -0500 Received: from localhost (50-198-241-253-static.hfc.comcastbusiness.net [50.198.241.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B4F8A20709; Mon, 23 Dec 2019 12:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577102670; bh=vqOz333XcUpVViuOrdBVCgE2uG8ahOJUCqixAmKA3Tg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PP3Sh8ubh48fkuc5aTmqk2o+R2cjxLpWJIg2mIbr1NOL838UsBUAQ9XMXIBcBzFhq 51cQqlfQkRwTVyvj/TJwr1Jdx4xPvaa8IjKDjzAsJrlcfodNeH4auuRVAxhp0rrEmB anlEtoUZgq0eSeFnUDDXtNQ6ok7Bhi7MQiJiFv+s= Date: Mon, 23 Dec 2019 07:04:28 -0500 From: Greg KH To: Yi Wang Cc: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, arnd@arndb.de, vincent.whitchurch@axis.com, alexios.zavras@intel.com, tglx@linutronix.de, allison@lohutok.net, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, up2wing@gmail.com, wang.liang82@zte.com.cn, Huang Zijiang Subject: Re: [PATCH] misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO. Message-ID: <20191223120428.GB114474@kroah.com> References: <1577065918-25513-1-git-send-email-wang.yi59@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1577065918-25513-1-git-send-email-wang.yi59@zte.com.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 23, 2019 at 09:51:58AM +0800, Yi Wang wrote: > 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); Odd indation :( Always use checkpatch.pl on your patches to ensure you do not add new problems. How did this get past 2 different people??? greg k-h