From: Greg KH <gregkh@linuxfoundation.org>
To: Lin YuChen <starpt.official@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: replace kzalloc/memcpy with kmemdup
Date: Mon, 9 Mar 2026 17:51:28 +0100 [thread overview]
Message-ID: <2026030904-throwback-renewably-3703@gregkh> (raw)
In-Reply-To: <20260309142150.547045-1-starpt.official@gmail.com>
On Mon, Mar 09, 2026 at 10:21:50PM +0800, Lin YuChen wrote:
> Replace the open-coded kzalloc and memcpy combination with kmemdup()
> to make the code more concise and idiomatic.
>
> Signed-off-by: Lin YuChen <starpt.official@gmail.com>
> ---
> v2:
> - Use real name in Signed-off-by line as requested by Ethan Tidmore.
> - Fix a minor whitespace issue in the error return path.
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index 7cb0c6f22bf3..3db6417a7de1 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -1430,14 +1430,12 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
> goto exit;
> }
>
> - buf = kzalloc(ielen, GFP_KERNEL);
> + buf = kmemdup(pie, ielen, GFP_KERNEL);
> if (!buf) {
> - ret = -ENOMEM;
> + ret = -ENOMEM;
You also changed the spacing here, while normally ok, it's not good for
a first patch. Please only do one logical-thing-per-patch.
thanks,
greg k-h
prev parent reply other threads:[~2026-03-09 16:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 14:21 [PATCH v2] staging: rtl8723bs: replace kzalloc/memcpy with kmemdup Lin YuChen
2026-03-09 16:51 ` Greg KH [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=2026030904-throwback-renewably-3703@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=starpt.official@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