From: Dan Carpenter <dan.carpenter@linaro.org>
To: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: Use kmemdup in sdio_ops.c
Date: Sat, 21 Feb 2026 16:20:07 +0300 [thread overview]
Message-ID: <aZmxB8Lr13KLj4lA@stanley.mountain> (raw)
In-Reply-To: <20260221105148.309255-2-giorgitchankvetadze1997@gmail.com>
On Sat, Feb 21, 2026 at 02:51:49PM +0400, Giorgi Tchankvetadze wrote:
> Replace kmalloc() + memcpy() with kmemdup() to simplify the code.
> No functional change.
>
> Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> index c9cb20c61a2b..6e03d3d8a6ab 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> @@ -583,11 +583,10 @@ s32 sdio_local_write(
> )
> return sd_cmd52_write(intfhdl, addr, cnt, buf);
>
> - tmpbuf = kmalloc(cnt, GFP_ATOMIC);
> + tmpbuf = kmemdup(buf, cnt, GFP_ATOMIC);
> if (!tmpbuf)
> return -ENOMEM;
>
> - memcpy(tmpbuf, buf, cnt);
>
You need to delete a blank line here as well.
regards,
dan carpenter
> err = sd_write(intfhdl, addr, cnt, tmpbuf);
prev parent reply other threads:[~2026-02-21 13:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-21 10:51 [PATCH] staging: rtl8723bs: Use kmemdup in sdio_ops.c Giorgi Tchankvetadze
2026-02-21 13:20 ` 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=aZmxB8Lr13KLj4lA@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=giorgitchankvetadze1997@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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