From: Kumar Kartikeya Dwivedi <memxor@gmail.com> To: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>, Ian Abbott <abbotti@mev.co.uk>, H Hartley Sweeten <hsweeten@visionengravers.com>, Ioana Radulescu <ruxandra.radulescu@nxp.com>, Ioana Ciornei <ioana.ciornei@nxp.com>, Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>, Vaibhav Agarwal <vaibhav.sr@gmail.com>, Mark Greer <mgreer@animalcreek.com>, Rui Miguel Silva <rmfrfs@gmail.com>, Viresh Kumar <vireshk@kernel.org>, Marc Dietrich <marvin24@gmx.de>, Jens Frederich <jfrederich@gmail.com>, Daniel Drake <dsd@laptop.org>, Jon Nettleton <jon.nettleton@gmail.com>, Larry Finger <Larry.Finger@lwfinger.net>, Florian Schilhabel <florian.c.schilhabel@googlemail.com>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Teddy Wang <teddy.wang@siliconmotion.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Andrew Morton <akpm@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Mike Rapoport <rppt@kernel.org>, Al Viro <viro@zeniv.linux.org.uk>, Florian Fainelli <f.fainelli@gmail.com>, Robert Richter <rric@kernel.org>, William Cohen <wcohen@redhat.com>, greybus-dev@lists.linaro.org, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH 08/13] staging: rtl8188eu: Switch from strlcpy to strscpy Date: Sun, 31 Jan 2021 22:58:29 +0530 [thread overview] Message-ID: <20210131172838.146706-9-memxor@gmail.com> (raw) In-Reply-To: <20210131172838.146706-1-memxor@gmail.com> strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 6f42f13a7..bf22f130d 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1865,7 +1865,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, goto exit; } - strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); + strscpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); if (pext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) param->u.crypt.set_tx = 1; -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: Kumar Kartikeya Dwivedi <memxor@gmail.com> To: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: linux-fbdev@vger.kernel.org, Jon Nettleton <jon.nettleton@gmail.com>, Mark Greer <mgreer@animalcreek.com>, Al Viro <viro@zeniv.linux.org.uk>, Marc Dietrich <marvin24@gmx.de>, Ioana Ciornei <ioana.ciornei@nxp.com>, William Cohen <wcohen@redhat.com>, ac100@lists.launchpad.net, Stephen Rothwell <sfr@canb.auug.org.au>, Florian Fainelli <f.fainelli@gmail.com>, Daniel Drake <dsd@laptop.org>, Jens Frederich <jfrederich@gmail.com>, Viresh Kumar <vireshk@kernel.org>, Robert Richter <rric@kernel.org>, Vaibhav Agarwal <vaibhav.sr@gmail.com>, Johan Hovold <johan@kernel.org>, Ian Abbott <abbotti@mev.co.uk>, Kumar Kartikeya Dwivedi <memxor@gmail.com>, linux-tegra@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, Florian Schilhabel <florian.c.schilhabel@googlemail.com>, Alex Elder <elder@kernel.org>, Teddy Wang <teddy.wang@siliconmotion.com>, greybus-dev@lists.linaro.org, Andrew Morton <akpm@linux-foundation.org>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Mike Rapoport <rppt@kernel.org>, Larry Finger <Larry.Finger@lwfinger.net> Subject: [PATCH 08/13] staging: rtl8188eu: Switch from strlcpy to strscpy Date: Sun, 31 Jan 2021 22:58:29 +0530 [thread overview] Message-ID: <20210131172838.146706-9-memxor@gmail.com> (raw) In-Reply-To: <20210131172838.146706-1-memxor@gmail.com> strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 6f42f13a7..bf22f130d 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1865,7 +1865,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, goto exit; } - strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); + strscpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); if (pext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) param->u.crypt.set_tx = 1; -- 2.29.2 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2021-01-31 19:47 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-31 17:28 [PATCH 00/13] Convert all users of strlcpy to strscpy Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 01/13] staging: comedi: Switch from " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 02/13] staging: greybus: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-02-16 14:54 ` Alex Elder 2021-02-16 14:54 ` Alex Elder 2021-02-16 15:48 ` Kumar Kartikeya Dwivedi 2021-02-16 15:48 ` Kumar Kartikeya Dwivedi 2021-02-16 15:49 ` Alex Elder 2021-02-16 15:49 ` Alex Elder 2021-02-21 15:42 ` [PATCH] staging/greybus: eliminate use of NAME_SIZE for strings Kumar Kartikeya Dwivedi 2021-02-21 15:42 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 03/13] staging: fsl-dpaa2: Switch from strlcpy to strscpy Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 04/13] staging: most: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 05/13] staging: nvec: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-02-03 11:09 ` Marc Dietrich 2021-02-03 11:09 ` Marc Dietrich 2021-01-31 17:28 ` [PATCH 06/13] staging: octeon: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-02-16 14:36 ` Robert Richter 2021-02-16 14:36 ` Robert Richter 2021-01-31 17:28 ` [PATCH 07/13] staging: olpc_dcon: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi [this message] 2021-01-31 17:28 ` [PATCH 08/13] staging: rtl8188eu: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 09/13] staging: rtl8192e: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 10/13] staging: rtl8192u: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 11/13] staging: rtl8712: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 12/13] staging: sm750fb: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` [PATCH 13/13] staging: wimax: " Kumar Kartikeya Dwivedi 2021-01-31 17:28 ` Kumar Kartikeya Dwivedi
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=20210131172838.146706-9-memxor@gmail.com \ --to=memxor@gmail.com \ --cc=Larry.Finger@lwfinger.net \ --cc=abbotti@mev.co.uk \ --cc=ac100@lists.launchpad.net \ --cc=akpm@linux-foundation.org \ --cc=devel@driverdev.osuosl.org \ --cc=dsd@laptop.org \ --cc=elder@kernel.org \ --cc=f.fainelli@gmail.com \ --cc=florian.c.schilhabel@googlemail.com \ --cc=gregkh@linuxfoundation.org \ --cc=greybus-dev@lists.linaro.org \ --cc=hsweeten@visionengravers.com \ --cc=ioana.ciornei@nxp.com \ --cc=jfrederich@gmail.com \ --cc=johan@kernel.org \ --cc=jon.nettleton@gmail.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=marvin24@gmx.de \ --cc=mgreer@animalcreek.com \ --cc=rmfrfs@gmail.com \ --cc=rppt@kernel.org \ --cc=rric@kernel.org \ --cc=ruxandra.radulescu@nxp.com \ --cc=sfr@canb.auug.org.au \ --cc=sudipm.mukherjee@gmail.com \ --cc=teddy.wang@siliconmotion.com \ --cc=tglx@linutronix.de \ --cc=vaibhav.sr@gmail.com \ --cc=vireshk@kernel.org \ --cc=viro@zeniv.linux.org.uk \ --cc=wcohen@redhat.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: linkBe 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.