public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8723bs: core: Replace rtw_malloc with kmalloc
Date: Fri, 19 Apr 2019 13:22:32 +0200	[thread overview]
Message-ID: <20190419112232.GB14886@kroah.com> (raw)
In-Reply-To: <1555669363-19782-1-git-send-email-bhanusreemahesh@gmail.com>

On Fri, Apr 19, 2019 at 03:52:43PM +0530, Bhanusree Pola wrote:
> Replace rtw_malloc with kmalloc to make code OS independent
> use kmalloc second argument as GFP_ATOMIC as these are called by functions
> that holds lock.
> 
> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 18fabf5..6a6683c 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -128,7 +128,7 @@ static void update_BCNTIM(struct adapter *padapter)
>  		}
>  
>  		if (remainder_ielen > 0) {
> -			pbackup_remainder_ie = rtw_malloc(remainder_ielen);
> +			pbackup_remainder_ie = kmalloc(remainder_ielen,GFP_ATOMIC);

Always run checkpatch.pl on your patches so you do nto get grumpy
maintainers telling you to run checkpatch.pl on your code :)

Why not fix up all of the callers of this function?  And are you sure
that GFP_ATOMIC is the correct thing to do here?

thanks,

greg k-h

  reply	other threads:[~2019-04-19 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 10:22 [PATCH] Staging: rtl8723bs: core: Replace rtw_malloc with kmalloc Bhanusree Pola
2019-04-19 11:22 ` Greg Kroah-Hartman [this message]
2019-04-19 13:32   ` Bhanusree Mahesh
2019-04-19 19:22     ` Greg Kroah-Hartman

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=20190419112232.GB14886@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhanusreemahesh@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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