* Re: [PATCH v2 1/2] staging: sm750fb: return -ETIMEDOUT on timeout in de_wait functions
From: Greg Kroah-Hartman @ 2026-04-26 19:08 UTC (permalink / raw)
To: Hungyu Lin
Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <20260409155821.23375-2-dennylin0707@gmail.com>
On Thu, Apr 09, 2026 at 03:58:20PM +0000, Hungyu Lin wrote:
> The hw_sm750le_de_wait() and hw_sm750_de_wait() functions return -1
> when a timeout occurs. Replace these with -ETIMEDOUT to use a proper
> errno value and better describe the error condition.
>
> All callers check the return value as non-zero, so this change does
> not alter existing behavior.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_hw.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index a2798d428663..3809401baa3a 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -502,7 +502,7 @@ int hw_sm750le_de_wait(void)
> return 0;
> }
> /* timeout error */
> - return -1;
> + return -ETIMEDOUT;
> }
>
> int hw_sm750_de_wait(void)
> @@ -520,7 +520,7 @@ int hw_sm750_de_wait(void)
> return 0;
> }
> /* timeout error */
> - return -1;
> + return -ETIMEDOUT;
The comment should be removed at the same time, now that the code itself
documents it properly, right?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v2 2/2] staging: sm750fb: propagate error codes from de_wait()
From: Greg Kroah-Hartman @ 2026-04-26 19:08 UTC (permalink / raw)
To: Hungyu Lin
Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <20260409155821.23375-3-dennylin0707@gmail.com>
On Thu, Apr 09, 2026 at 03:58:21PM +0000, Hungyu Lin wrote:
> The sm750 acceleration functions currently return -1 when
> de_wait() fails, discarding the original error code.
>
> Since de_wait() now returns proper errno values, propagate
> the error code instead of returning -1.
You can use the full 72 columns for a changelog text.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_accel.c | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index 0f94d859e91c..688ec262a8ed 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -90,14 +90,16 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
> u32 color, u32 rop)
> {
> u32 de_ctrl;
> + int ret;
>
> - if (accel->de_wait() != 0) {
> + ret = accel->de_wait();
> + if (ret) {
> /*
> - * int time wait and always busy,seems hardware
> + * int time wait and always busy, seems hardware
Nice fix, but not part of this change to make :(
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v11 02/20] gpu: nova-core: gsp: Extract usable FB region from GSP
From: Joel Fernandes @ 2026-04-25 20:57 UTC (permalink / raw)
To: John Hubbard
Cc: linux-kernel, Miguel Ojeda, Boqun Feng, Gary Guo, Bjorn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Dave Airlie, Daniel Almeida, Koen Koning,
dri-devel, rust-for-linux, Nikola Djukic, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Jonathan Corbet, Alex Deucher, Christian Koenig, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
Matthew Auld, Lucas De Marchi, Thomas Hellstrom, Helge Deller,
Alex Gaynor, Boqun Feng, Alistair Popple, Timur Tabi, Edwin Peer,
Alexandre Courbot, Andrea Righi, Andy Ritger, Zhi Wang,
Balbir Singh, Philipp Stanner, Elle Rhumsaa, alexeyi,
Eliot Courtney, joel, linux-doc, amd-gfx, intel-gfx, intel-xe,
linux-fbdev
In-Reply-To: <20260421145521.GA51176@joelbox2>
On Tue, Apr 21, 2026 at 10:55:21AM -0400, Joel Fernandes wrote:
> On Thu, Apr 16, 2026 at 04:26:48PM -0700, John Hubbard wrote:
> > On 4/15/26 2:05 PM, Joel Fernandes wrote:
> > ...
> >
> > Apologies, I found one more minor thing, while looking at a
> > subsequent patch in this series:
> >
> > > impl MessageFromGsp for GetGspStaticInfoReply {
> > > const FUNCTION: MsgFunction = MsgFunction::GetGspStaticInfo;
> > > type Message = GspStaticConfigInfo;
> > > - type InitError = Infallible;
> > > + type InitError = Error;
> > >
> > > fn read(
> > > msg: &Self::Message,
> > > @@ -205,6 +209,7 @@ fn read(
> > > ) -> Result<Self, Self::InitError> {
> > > Ok(GetGspStaticInfoReply {
> > > gpu_name: msg.gpu_name_str(),
> > > + usable_fb_region: msg.first_usable_fb_region().ok_or(ENODEV)?,
> >
> > OK, failing out is correct here. But in addition, we should also
> > log this at dev_err!() level. This is rare, surprising, and actionable,
> > so perfect for that level of logging.
>
> Sure, that works for me. Will add it in for v12.
dev_err unfortunately requires passing dev into MessageFromGsp::read()
which it doesn't today. Doing so modifies all other implementations of read()
as well, not just GspStaticInfo. For v12 I will leave it as is, but lets
discuss for future versions.
Also, note that the error does not go undetected because it will result in
the following dev_err firing anyway, perhaps its sufficient?
dev_err!(pdev, "Failed to obtain GSP static info ({:?})\n", e)
thanks,
--
Joel Fernandes
^ permalink raw reply
* Re: [GIT PULL] more fbdev fixes for v7.1-rc1
From: pr-tracker-bot @ 2026-04-25 15:19 UTC (permalink / raw)
To: Helge Deller; +Cc: Linus Torvalds, linux-kernel, linux-fbdev, dri-devel
In-Reply-To: <aex66_AU379EYm_a@carbonx1>
The pull request you sent on Sat, 25 Apr 2026 10:27:23 +0200:
> http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-7.1-rc1-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/897d54018cc9aa97fd1529ca08a53b429d05a566
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply
* Re: [PATCH 03/35] fbdev: sisfb: Use safer strscpy() instead of strcpy()
From: David Laight @ 2026-04-25 11:02 UTC (permalink / raw)
To: Helge Deller
Cc: Ai Chao, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas, linux-fbdev, dri-devel, linux-kernel,
linux-arm-kernel, linux-geode, linux-parisc
In-Reply-To: <ccd01f97-d4b7-4bd0-92c1-adc3b1136cbc@gmx.de>
On Sat, 25 Apr 2026 10:08:08 +0200
Helge Deller <deller@gmx.de> wrote:
> Hello Ai,
...
> > - strcpy(ivideo->myid, "SiS 730");
> > + strscpy(ivideo->myid, "SiS 730");
>
> The compiler knows at build time the length of myid, and the "SIS 730" string.
> Using strscpy() has no benefit here either. Contrary, the code generated
> because of using strscpy() is probably even larger.
> Don't replace such code with strscpy().
Both should get converted to a memcpy().
If you increase the literal to be too long I'm pretty sure you'll
get a compiler warning/error from strcpy().
OTOH strscpy() is more likely to truncate the string (I'd need to
check).
So leaving it as strcpy() is fine - and possibly even better.
The header files might get changed to error strcpy() unless the compiler
knows the source string has a constant length and the destination is
big enough - but that hasn't been done yet.
David
^ permalink raw reply
* [GIT PULL] more fbdev fixes for v7.1-rc1
From: Helge Deller @ 2026-04-25 8:27 UTC (permalink / raw)
To: Linus Torvalds, linux-kernel, linux-fbdev, dri-devel
Hi Linus,
please pull a few remaining fbdev fixes for this merge window.
Thanks!
Helge
----------------------------------------------------------------
The following changes since commit 6596a02b207886e9e00bb0161c7fd59fea53c081:
Merge tag 'drm-next-2026-04-22' of https://gitlab.freedesktop.org/drm/kernel (2026-04-21 17:39:21 -0700)
are available in the Git repository at:
http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-7.1-rc1-2
for you to fetch changes up to 448aaf54d3ae1b73dfcf723c9f8a02c2116f3358:
fbdev: hgafb: Request memory region before ioremap (2026-04-22 17:02:55 +0200)
----------------------------------------------------------------
fbdev fixes & cleanups for 7.1-rc1:
- request memory region before use (cobalt_lcdfb, clps711x-fb, hgafb)
- reference cleanups in failure path (offb, savage)
- a spelling fix (atyfb)
----------------------------------------------------------------
Amit Barzilai (2):
fbdev: cobalt_lcdfb: Request memory region
fbdev: clps711x-fb: Request memory region for MMIO
Ethan Carter Edwards (1):
fbdev: atyfb: Fix spelling mistake "enfore" -> "enforce"
Hardik Phalet (1):
fbdev: hgafb: Request memory region before ioremap
Yuho Choi (2):
fbdev: offb: fix PCI device reference leak on probe failure
fbdev: savage: fix probe-path EDID cleanup leaks
drivers/video/fbdev/aty/radeon_monitor.c | 2 +-
drivers/video/fbdev/clps711x-fb.c | 9 +++------
drivers/video/fbdev/cobalt_lcdfb.c | 12 +++---------
drivers/video/fbdev/hgafb.c | 9 +++++++--
drivers/video/fbdev/offb.c | 7 ++++++-
drivers/video/fbdev/savage/savagefb_driver.c | 2 ++
6 files changed, 22 insertions(+), 19 deletions(-)
^ permalink raw reply
* Re: [PATCH 03/35] fbdev: sisfb: Use safer strscpy() instead of strcpy()
From: Helge Deller @ 2026-04-25 8:08 UTC (permalink / raw)
To: Ai Chao, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc
In-Reply-To: <20260425065926.1091168-4-aichao@kylinos.cn>
Hello Ai,
Thanks that you want to contribute!
But your series isn't beneficial in most areas.
Some examples:
On 4/25/26 08:58, Ai Chao wrote:
> Use a safer function strscpy() instead of strcpy() for copying to arrays.
>
> Only idiomatic code replacement, and no functional changes.
>
> Signed-off-by: Ai Chao <aichao@kylinos.cn>
> ---
> drivers/video/fbdev/sis/sis_main.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
> index 84567d67f71d..e87fa261f76c 100644
> --- a/drivers/video/fbdev/sis/sis_main.c
> +++ b/drivers/video/fbdev/sis/sis_main.c
> @@ -205,7 +205,7 @@ static void sisfb_search_mode(char *name, bool quiet)
> }
>
> if(strlen(name) <= 19) {
> - strcpy(strbuf1, name);
> + strscpy(strbuf1, name);
We have strbuf1[20] above, and the length is checked.
There is no benefit of using strscpy() here.
(The code could be cleaned up in other ways though).
> for(i = 0; i < strlen(strbuf1); i++) {
> if(strbuf1[i] < '0' || strbuf1[i] > '9') strbuf1[i] = ' ';
> }
> @@ -5947,33 +5947,33 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> #ifdef CONFIG_FB_SIS_300
> case PCI_DEVICE_ID_SI_730:
> ivideo->chip = SIS_730;
> - strcpy(ivideo->myid, "SiS 730");
> + strscpy(ivideo->myid, "SiS 730");
The compiler knows at build time the length of myid, and the "SIS 730" string.
Using strscpy() has no benefit here either. Contrary, the code generated
because of using strscpy() is probably even larger.
Don't replace such code with strscpy().
--- a/drivers/video/fbdev/i810/i810-i2c.c
+++ b/drivers/video/fbdev/i810/i810-i2c.c
@@ -91,7 +91,7 @@ static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name)
{
int rc;
- strcpy(chan->adapter.name, name);
+ strscpy(chan->adapter.name, name);
Here it might make sense to use strscpy(), but it should be checked manually
and not using scripts to simply replace code.
That said: Thanks for your patches, but as-is I won't take them.
Helge
^ permalink raw reply
* [PATCH 00/35] Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
This patch series introduces wrapper functions strscpy().
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Summary:
fbdev: matroxfb: Use safer strscpy() instead of strcpy()
fbdev: i810: Use safer strscpy() instead of strcpy()
fbdev: sisfb: Use safer strscpy() instead of strcpy()
fbdev: geode: Use safer strscpy() instead of strcpy()
fbdev: atafb: Use safer strscpy() instead of strcpy()
fbdev: tdfxfb: Use safer strscpy() instead of strcpy()
fbdev: pm2fb: Use safer strscpy() instead of strcpy()
fbdev: xen-fbfront: Use safer strscpy() instead of strcpy()
fbdev: controlfb: Use safer strscpy() instead of strcpy()
fbdev: stifb: Use safer strscpy() instead of strcpy()
fbdev: fm2fb: Use safer strscpy() instead of strcpy()
fbdev: arkfb: Use safer strscpy() instead of strcpy()
fbdev: vt8500lcdfb: Use safer strscpy() instead of strcpy()
fbdev: vt8623fb: Use safer strscpy() instead of strcpy()
fbdev: gbefb: Use safer strscpy() instead of strcpy()
fbdev: wm8505fb: Use safer strscpy() instead of strcpy()
fbdev: rivafb: Use safer strscpy() instead of strcpy()
fbdev: sh7760fb: Use safer strscpy() instead of strcpy()
fbdev: savage: Use safer strscpy() instead of strcpy()
fbdev: atmel_lcdfb: Use safer strscpy() instead of strcpy()
fbdev: aty128fb: Use safer strscpy() instead of strcpy()
fbdev: amifb: Use safer strscpy() instead of strcpy()
fbdev: s3fb: Use safer strscpy() instead of strcpy()
fbdev: viafb: Use safer strscpy() instead of strcpy()
fbdev: platinumfb: Use safer strscpy() instead of strcpy()
fbdev: cyber2000fb: Use safer strscpy() instead of strcpy()
fbdev: mb862xxfb: Use safer strscpy() instead of strcpy()
fbdev: mmpfb: Use safer strscpy() instead of strcpy()
fbdev: ep93xx-fb: Use safer strscpy() instead of strcpy()
fbdev: valkyriefb: Use safer strscpy() instead of strcpy()
fbdev: pxafb: Use safer strscpy() instead of strcpy()
fbdev: sa1100fb: Use safer strscpy() instead of strcpy()
fbdev: sm501fb: Use safer strscpy() instead of strcpy()
fbdev: acornfb: Use safer strscpy() instead of strcpy()
fbdev: ocfb: Use safer strscpy() instead of strcpy()
drivers/video/fbdev/acornfb.c | 2 +-
drivers/video/fbdev/amifb.c | 2 +-
drivers/video/fbdev/arkfb.c | 2 +-
drivers/video/fbdev/atafb.c | 10 +++++-----
drivers/video/fbdev/atmel_lcdfb.c | 2 +-
drivers/video/fbdev/aty/aty128fb.c | 2 +-
drivers/video/fbdev/controlfb.c | 2 +-
drivers/video/fbdev/cyber2000fb.c | 2 +-
drivers/video/fbdev/ep93xx-fb.c | 2 +-
drivers/video/fbdev/fm2fb.c | 2 +-
drivers/video/fbdev/gbefb.c | 2 +-
drivers/video/fbdev/geode/gx1fb_core.c | 2 +-
drivers/video/fbdev/geode/gxfb_core.c | 2 +-
drivers/video/fbdev/geode/lxfb_core.c | 2 +-
drivers/video/fbdev/i810/i810-i2c.c | 2 +-
drivers/video/fbdev/i810/i810_main.c | 2 +-
drivers/video/fbdev/matrox/matroxfb_base.c | 6 +++---
drivers/video/fbdev/matrox/matroxfb_crtc2.c | 2 +-
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 2 +-
drivers/video/fbdev/mmp/fb/mmpfb.c | 2 +-
drivers/video/fbdev/ocfb.c | 2 +-
drivers/video/fbdev/platinumfb.c | 2 +-
drivers/video/fbdev/pm2fb.c | 6 +++---
drivers/video/fbdev/pxafb.c | 2 +-
drivers/video/fbdev/riva/rivafb-i2c.c | 2 +-
drivers/video/fbdev/s3fb.c | 2 +-
drivers/video/fbdev/sa1100fb.c | 2 +-
drivers/video/fbdev/savage/savagefb-i2c.c | 2 +-
drivers/video/fbdev/sh7760fb.c | 2 +-
drivers/video/fbdev/sis/sis_main.c | 16 ++++++++--------
drivers/video/fbdev/sm501fb.c | 2 +-
drivers/video/fbdev/stifb.c | 2 +-
drivers/video/fbdev/tdfxfb.c | 6 +++---
drivers/video/fbdev/valkyriefb.c | 2 +-
drivers/video/fbdev/via/viafbdev.c | 2 +-
drivers/video/fbdev/vt8500lcdfb.c | 2 +-
drivers/video/fbdev/vt8623fb.c | 2 +-
drivers/video/fbdev/wm8505fb.c | 2 +-
drivers/video/fbdev/xen-fbfront.c | 2 +-
39 files changed, 56 insertions(+), 56 deletions(-)
--
2.34.1
^ permalink raw reply
* [PATCH 19/35] fbdev: savage: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/savage/savagefb-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/savage/savagefb-i2c.c b/drivers/video/fbdev/savage/savagefb-i2c.c
index 80fa87e2ae2f..820d1f83669d 100644
--- a/drivers/video/fbdev/savage/savagefb-i2c.c
+++ b/drivers/video/fbdev/savage/savagefb-i2c.c
@@ -136,7 +136,7 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan,
int rc = 0;
if (chan->par) {
- strcpy(chan->adapter.name, name);
+ strscpy(chan->adapter.name, name);
chan->adapter.owner = THIS_MODULE;
chan->adapter.algo_data = &chan->algo;
chan->adapter.dev.parent = &chan->par->pcidev->dev;
--
2.34.1
^ permalink raw reply related
* [PATCH 18/35] fbdev: sh7760fb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/sh7760fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sh7760fb.c b/drivers/video/fbdev/sh7760fb.c
index 130adef2e468..acd70dff3a65 100644
--- a/drivers/video/fbdev/sh7760fb.c
+++ b/drivers/video/fbdev/sh7760fb.c
@@ -508,7 +508,7 @@ static int sh7760fb_probe(struct platform_device *pdev)
info->var.transp.length = 0;
info->var.transp.msb_right = 0;
- strcpy(info->fix.id, "sh7760-lcdc");
+ strscpy(info->fix.id, "sh7760-lcdc");
/* set the DON2 bit now, before cmap allocation, as it will randomize
* palette memory.
--
2.34.1
^ permalink raw reply related
* [PATCH 17/35] fbdev: rivafb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/riva/rivafb-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/riva/rivafb-i2c.c b/drivers/video/fbdev/riva/rivafb-i2c.c
index 6a183375ced1..5ee59be01850 100644
--- a/drivers/video/fbdev/riva/rivafb-i2c.c
+++ b/drivers/video/fbdev/riva/rivafb-i2c.c
@@ -91,7 +91,7 @@ static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name,
{
int rc;
- strcpy(chan->adapter.name, name);
+ strscpy(chan->adapter.name, name);
chan->adapter.owner = THIS_MODULE;
chan->adapter.class = i2c_class;
chan->adapter.algo_data = &chan->algo;
--
2.34.1
^ permalink raw reply related
* [PATCH 15/35] fbdev: gbefb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/gbefb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index cb6ff15a21db..34da219b6e76 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -818,7 +818,7 @@ static void gbefb_encode_fix(struct fb_fix_screeninfo *fix,
struct fb_var_screeninfo *var)
{
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
- strcpy(fix->id, "SGI GBE");
+ strscpy(fix->id, "SGI GBE");
fix->smem_start = (unsigned long) gbe_mem;
fix->smem_len = gbe_mem_size;
fix->type = FB_TYPE_PACKED_PIXELS;
--
2.34.1
^ permalink raw reply related
* [PATCH 14/35] fbdev: vt8623fb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/vt8623fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c
index df984f3a7ff6..521b60b8b3e4 100644
--- a/drivers/video/fbdev/vt8623fb.c
+++ b/drivers/video/fbdev/vt8623fb.c
@@ -752,7 +752,7 @@ static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
}
info->fix.smem_len = info->screen_size;
- strcpy(info->fix.id, "VIA VT8623");
+ strscpy(info->fix.id, "VIA VT8623");
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
info->fix.ypanstep = 0;
--
2.34.1
^ permalink raw reply related
* [PATCH 16/35] fbdev: wm8505fb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/wm8505fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c
index 5caf74ca92fb..8d6b530e5ad3 100644
--- a/drivers/video/fbdev/wm8505fb.c
+++ b/drivers/video/fbdev/wm8505fb.c
@@ -278,7 +278,7 @@ static int wm8505fb_probe(struct platform_device *pdev)
if (!fbi)
return -ENOMEM;
- strcpy(fbi->fb.fix.id, DRIVER_NAME);
+ strscpy(fbi->fb.fix.id, DRIVER_NAME);
fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS;
fbi->fb.fix.xpanstep = 1;
--
2.34.1
^ permalink raw reply related
* [PATCH 13/35] fbdev: vt8500lcdfb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/vt8500lcdfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index 85c7a99a7d64..d6e061628100 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -287,7 +287,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
if (!fbi)
return -ENOMEM;
- strcpy(fbi->fb.fix.id, "VT8500 LCD");
+ strscpy(fbi->fb.fix.id, "VT8500 LCD");
fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS;
fbi->fb.fix.xpanstep = 0;
--
2.34.1
^ permalink raw reply related
* [PATCH 12/35] fbdev: arkfb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/arkfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
index 866c1165704e..a05900f0e691 100644
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -1025,7 +1025,7 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
info->screen_size = (1 << (regval >> 6)) << 20;
info->fix.smem_len = info->screen_size;
- strcpy(info->fix.id, "ARK 2000PV");
+ strscpy(info->fix.id, "ARK 2000PV");
info->fix.mmio_start = 0;
info->fix.mmio_len = 0;
info->fix.type = FB_TYPE_PACKED_PIXELS;
--
2.34.1
^ permalink raw reply related
* [PATCH 11/35] fbdev: fm2fb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/fm2fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/fm2fb.c b/drivers/video/fbdev/fm2fb.c
index 25d2e716edf2..276e1dc1f57c 100644
--- a/drivers/video/fbdev/fm2fb.c
+++ b/drivers/video/fbdev/fm2fb.c
@@ -254,7 +254,7 @@ static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id)
fb_fix.mmio_start = fb_fix.smem_start + FRAMEMASTER_REG;
fm2fb_reg = (unsigned char *)(info->screen_base+FRAMEMASTER_REG);
- strcpy(fb_fix.id, is_fm ? "FrameMaster II" : "Rainbow II");
+ strscpy(fb_fix.id, is_fm ? "FrameMaster II" : "Rainbow II");
/* make EBU color bars on display */
ptr = (unsigned long *)fb_fix.smem_start;
--
2.34.1
^ permalink raw reply related
* [PATCH 10/35] fbdev: stifb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/stifb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 8e5bac27542d..578770bdee02 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1357,7 +1357,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
var->yres = var->yres_virtual = yres;
var->bits_per_pixel = bpp;
- strcpy(fix->id, "stifb");
+ strscpy(fix->id, "stifb");
info->fbops = &stifb_ops;
info->screen_base = ioremap(REGION_BASE(fb,1), fix->smem_len);
if (!info->screen_base) {
--
2.34.1
^ permalink raw reply related
* [PATCH 09/35] fbdev: controlfb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:59 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/controlfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index 4bb821d7f284..09cf6befd8d3 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -780,7 +780,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro
fb_alloc_cmap(&info->cmap, 256, 0);
/* Fill fix common fields */
- strcpy(info->fix.id, "control");
+ strscpy(info->fix.id, "control");
info->fix.mmio_start = p->control_regs_phys;
info->fix.mmio_len = sizeof(struct control_regs);
info->fix.type = FB_TYPE_PACKED_PIXELS;
--
2.34.1
^ permalink raw reply related
* [PATCH 08/35] fbdev: xen-fbfront: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/xen-fbfront.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
index 4385976277ac..1cc234751be5 100644
--- a/drivers/video/fbdev/xen-fbfront.c
+++ b/drivers/video/fbdev/xen-fbfront.c
@@ -429,7 +429,7 @@ static int xenfb_probe(struct xenbus_device *dev,
fb_info->fix.line_length = fb_info->var.xres * XENFB_DEPTH / 8;
fb_info->fix.smem_start = 0;
fb_info->fix.smem_len = fb_size;
- strcpy(fb_info->fix.id, "xen");
+ strscpy(fb_info->fix.id, "xen");
fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
fb_info->fix.accel = FB_ACCEL_NONE;
--
2.34.1
^ permalink raw reply related
* [PATCH 07/35] fbdev: pm2fb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/pm2fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c
index f34429829b7d..ad1e4bc5fe6f 100644
--- a/drivers/video/fbdev/pm2fb.c
+++ b/drivers/video/fbdev/pm2fb.c
@@ -1543,15 +1543,15 @@ static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
switch (pdev->device) {
case PCI_DEVICE_ID_TI_TVP4020:
- strcpy(pm2fb_fix.id, "TVP4020");
+ strscpy(pm2fb_fix.id, "TVP4020");
default_par->type = PM2_TYPE_PERMEDIA2;
break;
case PCI_DEVICE_ID_3DLABS_PERMEDIA2:
- strcpy(pm2fb_fix.id, "Permedia2");
+ strscpy(pm2fb_fix.id, "Permedia2");
default_par->type = PM2_TYPE_PERMEDIA2;
break;
case PCI_DEVICE_ID_3DLABS_PERMEDIA2V:
- strcpy(pm2fb_fix.id, "Permedia2v");
+ strscpy(pm2fb_fix.id, "Permedia2v");
default_par->type = PM2_TYPE_PERMEDIA2V;
break;
}
--
2.34.1
^ permalink raw reply related
* [PATCH 06/35] fbdev: tdfxfb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/tdfxfb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c
index 4c4e53aaea3a..b7cc2b1012eb 100644
--- a/drivers/video/fbdev/tdfxfb.c
+++ b/drivers/video/fbdev/tdfxfb.c
@@ -1401,15 +1401,15 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
/* Configure the default fb_fix_screeninfo first */
switch (pdev->device) {
case PCI_DEVICE_ID_3DFX_BANSHEE:
- strcpy(info->fix.id, "3Dfx Banshee");
+ strscpy(info->fix.id, "3Dfx Banshee");
default_par->max_pixclock = BANSHEE_MAX_PIXCLOCK;
break;
case PCI_DEVICE_ID_3DFX_VOODOO3:
- strcpy(info->fix.id, "3Dfx Voodoo3");
+ strscpy(info->fix.id, "3Dfx Voodoo3");
default_par->max_pixclock = VOODOO3_MAX_PIXCLOCK;
break;
case PCI_DEVICE_ID_3DFX_VOODOO5:
- strcpy(info->fix.id, "3Dfx Voodoo5");
+ strscpy(info->fix.id, "3Dfx Voodoo5");
default_par->max_pixclock = VOODOO5_MAX_PIXCLOCK;
break;
}
--
2.34.1
^ permalink raw reply related
* [PATCH 05/35] fbdev: atafb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/atafb.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index b8ed1c537293..5f2d50919718 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -555,7 +555,7 @@ static int tt_encode_fix(struct fb_fix_screeninfo *fix, struct atafb_par *par)
{
int mode;
- strcpy(fix->id, "Atari Builtin");
+ strscpy(fix->id, "Atari Builtin");
fix->smem_start = phys_screen_base;
fix->smem_len = screen_len;
fix->type = FB_TYPE_INTERLEAVED_PLANES;
@@ -851,7 +851,7 @@ static inline int hxx_prescale(struct falcon_hw *hw)
static int falcon_encode_fix(struct fb_fix_screeninfo *fix,
struct atafb_par *par)
{
- strcpy(fix->id, "Atari Builtin");
+ strscpy(fix->id, "Atari Builtin");
fix->smem_start = phys_screen_base;
fix->smem_len = screen_len;
fix->type = FB_TYPE_INTERLEAVED_PLANES;
@@ -1770,7 +1770,7 @@ static int stste_encode_fix(struct fb_fix_screeninfo *fix,
{
int mode;
- strcpy(fix->id, "Atari Builtin");
+ strscpy(fix->id, "Atari Builtin");
fix->smem_start = phys_screen_base;
fix->smem_len = screen_len;
fix->type = FB_TYPE_INTERLEAVED_PLANES;
@@ -2069,7 +2069,7 @@ static void st_ovsc_switch(void)
static int ext_encode_fix(struct fb_fix_screeninfo *fix, struct atafb_par *par)
{
- strcpy(fix->id, "Unknown Extern");
+ strscpy(fix->id, "Unknown Extern");
fix->smem_start = external_addr;
fix->smem_len = PAGE_ALIGN(external_len);
if (external_depth == 1) {
@@ -3100,7 +3100,7 @@ static int __init atafb_probe(struct platform_device *pdev)
}
#endif /* ATAFB_EXT */
-// strcpy(fb_info.mode->name, "Atari Builtin ");
+// strscpy(fb_info.mode->name, "Atari Builtin ");
fb_info.fbops = &atafb_ops;
// try to set default (detected; requested) var
do_fb_set_var(&atafb_predefined[default_par - 1], 1);
--
2.34.1
^ permalink raw reply related
* [PATCH 03/35] fbdev: sisfb: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/sis/sis_main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 84567d67f71d..e87fa261f76c 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -205,7 +205,7 @@ static void sisfb_search_mode(char *name, bool quiet)
}
if(strlen(name) <= 19) {
- strcpy(strbuf1, name);
+ strscpy(strbuf1, name);
for(i = 0; i < strlen(strbuf1); i++) {
if(strbuf1[i] < '0' || strbuf1[i] > '9') strbuf1[i] = ' ';
}
@@ -5947,33 +5947,33 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_FB_SIS_300
case PCI_DEVICE_ID_SI_730:
ivideo->chip = SIS_730;
- strcpy(ivideo->myid, "SiS 730");
+ strscpy(ivideo->myid, "SiS 730");
break;
#endif
#ifdef CONFIG_FB_SIS_315
case PCI_DEVICE_ID_SI_651:
/* ivideo->chip is ok */
- strcpy(ivideo->myid, "SiS 651");
+ strscpy(ivideo->myid, "SiS 651");
break;
case PCI_DEVICE_ID_SI_740:
ivideo->chip = SIS_740;
- strcpy(ivideo->myid, "SiS 740");
+ strscpy(ivideo->myid, "SiS 740");
break;
case PCI_DEVICE_ID_SI_661:
ivideo->chip = SIS_661;
- strcpy(ivideo->myid, "SiS 661");
+ strscpy(ivideo->myid, "SiS 661");
break;
case PCI_DEVICE_ID_SI_741:
ivideo->chip = SIS_741;
- strcpy(ivideo->myid, "SiS 741");
+ strscpy(ivideo->myid, "SiS 741");
break;
case PCI_DEVICE_ID_SI_760:
ivideo->chip = SIS_760;
- strcpy(ivideo->myid, "SiS 760");
+ strscpy(ivideo->myid, "SiS 760");
break;
case PCI_DEVICE_ID_SI_761:
ivideo->chip = SIS_761;
- strcpy(ivideo->myid, "SiS 761");
+ strscpy(ivideo->myid, "SiS 761");
break;
#endif
default:
--
2.34.1
^ permalink raw reply related
* [PATCH 04/35] fbdev: geode: Use safer strscpy() instead of strcpy()
From: Ai Chao @ 2026-04-25 6:58 UTC (permalink / raw)
To: deller, nicolas.ferre, alexandre.belloni, claudiu.beznea, linux,
dilinger, adaplas, James.Bottomley, FlorianSchandinat, alchark,
krzk, kees, rene, tzimmermann, rongqianfeng, thorsten.blum,
chelsyratnawat2001, soci, gregkh, daniel, linmq006,
fourier.thomas
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, linux-parisc, Ai Chao
In-Reply-To: <20260425065926.1091168-1-aichao@kylinos.cn>
Use a safer function strscpy() instead of strcpy() for copying to arrays.
Only idiomatic code replacement, and no functional changes.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
---
drivers/video/fbdev/geode/gx1fb_core.c | 2 +-
drivers/video/fbdev/geode/gxfb_core.c | 2 +-
drivers/video/fbdev/geode/lxfb_core.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index a1919c1934ac..c5a6e3038b98 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -274,7 +274,7 @@ static struct fb_info *gx1fb_init_fbinfo(struct device *dev)
par = info->par;
- strcpy(info->fix.id, "GX1");
+ strscpy(info->fix.id, "GX1");
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.type_aux = 0;
diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c
index 8d69be7c9d31..fe987829315b 100644
--- a/drivers/video/fbdev/geode/gxfb_core.c
+++ b/drivers/video/fbdev/geode/gxfb_core.c
@@ -289,7 +289,7 @@ static struct fb_info *gxfb_init_fbinfo(struct device *dev)
par = info->par;
- strcpy(info->fix.id, "Geode GX");
+ strscpy(info->fix.id, "Geode GX");
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.type_aux = 0;
diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c
index cad99f5b7fe8..3ae37ec9f151 100644
--- a/drivers/video/fbdev/geode/lxfb_core.c
+++ b/drivers/video/fbdev/geode/lxfb_core.c
@@ -412,7 +412,7 @@ static struct fb_info *lxfb_init_fbinfo(struct device *dev)
par = info->par;
- strcpy(info->fix.id, "Geode LX");
+ strscpy(info->fix.id, "Geode LX");
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.type_aux = 0;
--
2.34.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox