All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: use strscpy() for ifname copy
Date: Tue, 1 Sep 2026 12:09:07 +0200	[thread overview]
Message-ID: <2026090141-revenue-crawfish-0f8d@gregkh> (raw)
In-Reply-To: <20260826143418.5713-1-nsvatoslav515@gmail.com>

On Wed, Aug 26, 2026 at 05:34:18PM +0300, Svyatoslav Nikolenko wrote:
> Replace snprintf() with strscpy() when copying ifname into registry_par
> to avoid unnecessary format specifier parsing.
> 
> Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index f31196f54b3e..dd0c5fc813c8 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -256,7 +256,7 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
>  
>  	registry_par->enable80211d = (u8)rtw_80211d;
>  
> -	snprintf(registry_par->ifname, 16, "%s", ifname);
> +	strscpy(registry_par->ifname, ifname, sizeof(registry_par->ifname));
>  
>  	registry_par->notch_filter = (u8)rtw_notch_filter;

the ifname module option, and field, should just be removed from this
driver entirely.  Can you do that instead?

thanks,

greg k-h

      reply	other threads:[~2026-09-01 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 14:34 [PATCH] staging: rtl8723bs: use strscpy() for ifname copy Svyatoslav Nikolenko
2026-09-01 10:09 ` Greg Kroah-Hartman [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=2026090141-revenue-crawfish-0f8d@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=nsvatoslav515@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.