MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init()
PATCH 1/1 MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init()
strcpy() is deprecated; use strscpy() instead.
--- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
@@ -764,7 +764,7 @@ void __init board_prom_init(void)snprintf (cfe_version,12 ,"%s" , (char *) &cfe[4 ]); } }else { -strcpy (cfe_version,"unknown" ); +strscpy (cfe_version,"unknown" ); }pr_info ("CFE version: %s\n" , cfe_version);
Signature · 1 line
2.49.0
Quoted 5 lines · Thorsten Blum
strcpy()is deprecated; usestrscpy()instead.
Can you use --cc OR put this line...
Quoted 2 lines
Signed-off-by Thorsten Blum <[email protected]>---
...here (after the cutter), so we won't see this in the commit message? The list will be available in the lore archive anyway.
arch/mips/bcm63xx/boards/board_bcm963xx.c void __init board_prom_init(void) · line 768
Quoted 7 lines
arch/mips/bcm63xx/boards/board_bcm963xx.c +1
-1@@ -764,7 +764,7 @@ void __init board_prom_init(void)snprintf (cfe_version,12 ,"%s" , (char *) &cfe[4 ]); } }else { -strcpy (cfe_version,"unknown" ); +strscpy (cfe_version,"unknown" ); }
Have you compiled this with make W=1 with recent GCCs? I would recommend to rewrite the whole function, as per commit ee44a1def7ee ("leds: core: Bail out when composed name can't fit the buffer") in Linux Next.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 1 line · Andy Shevchenko
Can you use --cc OR put this line...
Yes, will do next time.
Quoted 1 line
Have you compiled this with
make W=1with recent GCCs?
Yes, I compile-tested it with W=1 and mips64-linux-gnu-gcc 14.2.1.
Thanks,
Thorsten
Quoted 8 lines · Thorsten Blum
Quoted 1 line · Andy Shevchenko
Can you use --cc OR put this line...
Yes, will do next time.
Quoted 1 line
Have you compiled this with
make W=1with recent GCCs?Yes, I compile-tested it with W=1 and mips64-linux-gnu-gcc 14.2.1.
Cool, no warnings?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
Quoted 8 lines · Thorsten Blum
Quoted 1 line · Andy Shevchenko
Can you use --cc OR put this line...
Yes, will do next time.
Quoted 1 line
Have you compiled this with
make W=1with recent GCCs?Yes, I compile-tested it with W=1 and mips64-linux-gnu-gcc 14.2.1.
Cool, no warnings?
No warnings, at least none related to my change or compiling board_bcm963xx.c
Best,
Thorsten
Quoted 7 lines · Thorsten Blum
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Thorsten Blum
Quoted 1 line · Andy Shevchenko
Can you use --cc OR put this line...
Yes, will do next time.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Have you compiled this with
make W=1with recent GCCs?Yes, I compile-tested it with W=1 and mips64-linux-gnu-gcc 14.2.1.
Cool, no warnings?
No warnings, at least none related to my change or compiling
board_bcm963xx.c
Thanks for confirming!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 24 lines · Thorsten Blum
strcpy()is deprecated; usestrscpy()instead.Signed-off-by Thorsten Blum <[email protected]>--- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/bcm63xx/boards/board_bcm963xx.c +1
-1@@ -764,7 +764,7 @@ void __init board_prom_init(void)snprintf (cfe_version,12 ,"%s" , (char *) &cfe[4 ]); } }else { -strcpy (cfe_version,"unknown" ); +strscpy (cfe_version,"unknown" ); }pr_info ("CFE version: %s\n" , cfe_version);Signature · 1 line
2.49.0
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]