From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Straube <straube.linux@gmail.com>,
Mamta Shukla <mamtashukla555@gmail.com>,
Nishka Dasgupta <nishkadg.linux@gmail.com>,
Emanuel Bennici <benniciemanuel78@gmail.com>,
Puranjay Mohan <puranjay12@gmail.com>,
Shobhit Kukreti <shobhitkukreti@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [Patch v2] staging: rtl8723bs: os_dep: ioctl_linux: make use of kzalloc
Date: Tue, 18 Jun 2019 11:55:24 +0300 [thread overview]
Message-ID: <20190618085524.GJ28859@kadam> (raw)
In-Reply-To: <20190618014410.GA8505@hari-Inspiron-1545>
On Tue, Jun 18, 2019 at 07:14:10AM +0530, Hariprasad Kelam wrote:
> kmalloc with memset can be replaced with kzalloc.
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> -----
> changes in v2: Replace rtw_zmalloc with kzalloc
> ---
> ---
The changelog should say something like:
This patch is a cleanup which replaces rtw_malloc(wep_total_len)
with kzalloc() and removes the memset().
The rtw_malloc() does GFP_ATOMIC allocations when in_atomic() is true.
But as the comments for in_atomic() describe, the in_atomic() check
should not be used in driver code. The in_atomic() check is not
accurate when preempt is disabled.
In this code we are not in IRQ context and we are not holding any
spin_locks so GFP_KERNEL is safe.
regards,
dan carpenter
prev parent reply other threads:[~2019-06-18 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 1:44 [Patch v2] staging: rtl8723bs: os_dep: ioctl_linux: make use of kzalloc Hariprasad Kelam
2019-06-18 6:57 ` Greg Kroah-Hartman
2019-06-18 8:55 ` Dan Carpenter [this message]
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=20190618085524.GJ28859@kadam \
--to=dan.carpenter@oracle.com \
--cc=benniciemanuel78@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hariprasad.kelam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mamtashukla555@gmail.com \
--cc=nishkadg.linux@gmail.com \
--cc=puranjay12@gmail.com \
--cc=shobhitkukreti@gmail.com \
--cc=straube.linux@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