Instead, depend on the size of the destination buffer for easier
refactoring.
Signed-off-by: Kumar Kartikeya Dwivedi
---
Hopefully, this is more thorough. The only cases left now are where the
destination string is represented by a pointer, otherwise all call sites with a
fixed sized buffer have
On Tue, Feb 16, 2021 at 08:24:59PM IST, Alex Elder wrote:
> This is a good change. But while you're at it, I would
> appreciate if you would convert a few spots to use
> sizeof(dest) rather than a fixed constant. I will
> point them out below.
>
> If this is the *only* request for a change on yo
d it be static?
Signed-off-by: Kumar Kartikeya Dwivedi
---
Changes in v1:
Switch to variable with static linkage instead of extern
Changes in v2:
Resend a versioned patch
Changes in v3:
Include version changelog below the marker
---
drivers/staging/emxx_udc/emxx_udc.c | 3 +++
drivers/staging/emxx_
d it be static?
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/emxx_udc/emxx_udc.c | 3 +++
drivers/staging/emxx_udc/emxx_udc.h | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.c
b/drivers/staging/emxx_udc/emxx_udc.c
index a30
2f52ecd69f21f8dab Mon Sep 17 00:00:00 2001
From: Kumar Kartikeya Dwivedi
Date: Sun, 7 Feb 2021 12:53:39 +0530
Subject: [PATCH] staging: emxx_udc: Make incorrectly defined global static
The global gpio_desc pointer and int vbus_irq were defined in the header,
instead put the definitions in the tr
t
declared. Should it be static?
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/emxx_udc/emxx_udc.c | 3 +++
drivers/staging/emxx_udc/emxx_udc.h | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.c
b/drivers/staging/emxx_udc/e
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/wimax/i2400m/netdev.c | 6 +++---
drivers/staging/wimax/i2400m/usb.c| 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drive
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm7
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
b/drive
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_et
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
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
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c
b/drivers/staging
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/octeon/ethernet-mdio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/octeon/ethernet-mdio.c
b/drivers/stag
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/nvec/nvec_ps2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_p
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/most/sound/sound.c | 2 +-
drivers/staging/most/video/video.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw-et
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/greybus/audio_helper.c | 2 +-
drivers/staging/greybus/audio_module.c | 2 +-
drivers/staging/greybus/audio_topology.c | 6 +++---
drivers/stagi
sites
that expect truncation.
$ spatch --sp-file strscpy.cocci --include-headers --dir --in-place
drivers/staging
@strscpy@
expression dest, src, size;
@@
-strlcpy(dest, src, size);
+strscpy(dest, src, size);
2. Each individual automated conversion was rechecked manually for correctness.
Kumar
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/comedi/comedi_fops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/stag
checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/qlge/qlge_ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/qlge/qlge_ethtool.c
b/drivers/st
On 0129, Greg Kroah-Hartman wrote:
> [SNIP]
> > Yes, because it's copying the source strings to fixed size buffers in
> > ethtool_drvinfo, so truncation would be fine here (as it's the driver name
> > and
> > other identity related stuff).
>
> So there is no need to make this change, or it is re
On 0129, Greg Kroah-Hartman wrote:
> On Fri, Jan 29, 2021 at 01:51:55PM +0530, Kumar Kartikeya Dwivedi wrote:
> > [Forgot to reply-all]
> >
> > On 0129, Greg Kroah-Hartman wrote:
> > > On Fri, Jan 29, 2021 at 12:15:23PM +0530, Kumar Kartikeya Dwivedi wrote:
> &g
[Forgot to reply-all]
On 0129, Greg Kroah-Hartman wrote:
> On Fri, Jan 29, 2021 at 12:15:23PM +0530, Kumar Kartikeya Dwivedi wrote:
> > Fixes checkpatch warnings for usage of strlcpy.
>
> What warning would that be?
>
5dbdb2d87c294401a22e6a6002f08ebc9fbea38b
https://git.
Fixes checkpatch warnings for usage of strlcpy.
Signed-off-by: Kumar Kartikeya Dwivedi
---
drivers/staging/qlge/qlge_ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/qlge/qlge_ethtool.c
b/drivers/staging/qlge/qlge_ethtool.c
index a28f0254c
25 matches
Mail list logo