From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Yi Wang <wang.yi59@zte.com.cn>, <sudeep.dutt@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 <huang.zijiang@zte.com.cn>
Subject: Re: [PATCH] misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO.
Date: Mon, 23 Dec 2019 13:42:36 -0800 [thread overview]
Message-ID: <87v9q6afcj.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20191223120428.GB114474@kroah.com>
On Mon, 23 Dec 2019 04:04:28 -0800, Greg KH wrote:
>
> On Mon, Dec 23, 2019 at 09:51:58AM +0800, Yi Wang wrote:
> > From: Huang Zijiang <huang.zijiang@zte.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@zte.com.cn>
> > Signed-off-by: Yi Wang <wang.yi59@zte.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);
>
> 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???
Sorry, didn't see the mail, it ended up in Junk. Thanks for catching it.
next prev parent reply other threads:[~2019-12-23 21:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 1:51 [PATCH] misc: Use kzalloc() instead of kmalloc() with flag GFP_ZERO Yi Wang
2019-12-23 12:04 ` Greg KH
2019-12-23 21:42 ` Dixit, Ashutosh [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-12 9:54 Yi Wang
2020-02-14 17:16 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9q6afcj.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=huang.zijiang@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.dutt@intel.com \
--cc=tglx@linutronix.de \
--cc=up2wing@gmail.com \
--cc=vincent.whitchurch@axis.com \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.