From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Geliang Tang <geliangtang@163.com>
Cc: "Raphaël Beamonte" <raphael.beamonte@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] staging: rtl8192u: r8192U_core: use kmalloc_array instead of kmalloc
Date: Sun, 7 Feb 2016 19:55:09 -0800 [thread overview]
Message-ID: <20160208035509.GA13031@kroah.com> (raw)
In-Reply-To: <d0c229081af01bbf95743135d2781eeccfb66611.1446991712.git.geliangtang@163.com>
On Sun, Nov 08, 2015 at 10:17:54PM +0800, Geliang Tang wrote:
> Use kmalloc_array instead of kmalloc to allocate memory for an array.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index e06864f..07a1447 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1725,8 +1725,8 @@ static short rtl8192_usb_initendpoints(struct net_device *dev)
> {
> struct r8192_priv *priv = ieee80211_priv(dev);
>
> - priv->rx_urb = kmalloc(sizeof(struct urb *) * (MAX_RX_URB + 1),
> - GFP_KERNEL);
> + priv->rx_urb = kmalloc_array(MAX_RX_URB + 1, sizeof(struct urb *),
> + GFP_KERNEL);
I don't see the benefit here with this change, do you?
next prev parent reply other threads:[~2016-02-08 3:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 14:17 [PATCH 1/4] staging: comedi: use kmalloc_array instead of kmalloc Geliang Tang
2015-11-08 14:17 ` [PATCH 2/4] staging: rdma: " Geliang Tang
2015-11-08 14:17 ` [PATCH 3/4] staging: lustre: libcfs: " Geliang Tang
2015-11-08 14:17 ` [PATCH 4/4] staging: rtl8192u: r8192U_core: " Geliang Tang
2016-02-08 3:55 ` Greg Kroah-Hartman [this message]
2016-02-23 0:55 ` Geliang Tang
2016-02-23 1:10 ` Greg Kroah-Hartman
2015-11-09 13:49 ` [PATCH 1/4] staging: comedi: " Ian Abbott
2015-11-10 14:41 ` [PATCH v2] " Geliang Tang
2015-11-11 14:09 ` Ian Abbott
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=20160208035509.GA13031@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=geliangtang@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raphael.beamonte@gmail.com \
/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 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).