cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu
Subsystems (4)
PATCH 1/2 cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu
strcpy() is deprecated; use strscpy() instead.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/cpuidle/cpuidle-psci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpuidle/cpuidle-psci.c +2 -2
@@ -382,8 +382,8 @@ static int psci_idle_init_cpu(struct device *dev, int cpu) drv->states[0 ].exit_latency =1 ; drv->states[0 ].target_residency =1 ; drv->states[0 ].power_usage =UINT_MAX ; -strcpy (drv->states[0 ].name,"WFI" ); -strcpy (drv->states[0 ].desc,"ARM WFI" ); +strscpy (drv->states[0 ].name,"WFI" ); +strscpy (drv->states[0 ].desc,"ARM WFI" );/* * If no DT idle states are detected (ret == 0) let the driver
Signature · 1 line
2.51.0
PATCH 2/2 cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
strcpy() is deprecated; use strscpy() instead.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/cpuidle/cpuidle-riscv-sbi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/cpuidle/cpuidle-riscv-sbi.c +3 -2
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/of.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> #include <linux/pm_runtime.h>
@@ -303,8 +304,8 @@ static int sbi_cpuidle_init_cpu(struct device *dev, int cpu) drv->states[0 ].exit_latency =1 ; drv->states[0 ].target_residency =1 ; drv->states[0 ].power_usage =UINT_MAX ; -strcpy (drv->states[0 ].name,"WFI" ); -strcpy (drv->states[0 ].desc,"RISC-V WFI" ); +strscpy (drv->states[0 ].name,"WFI" ); +strscpy (drv->states[0 ].desc,"RISC-V WFI" );/* * If no DT idle states are detected (ret == 0) let the driver
Signature · 1 line
2.51.0
Quoted 5 lines · Thorsten Blum
strcpy()is deprecated; usestrscpy()instead.Signed-off-by Thorsten Blum <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 22 lines
--- drivers/cpuidle/cpuidle-psci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpuidle/cpuidle-psci.c +2
-3@@ -382,8 +382,8 @@ static int psci_idle_init_cpu(struct device *dev, int cpu) drv->states[0 ].exit_latency =1 ; drv->states[0 ].target_residency =1 ; drv->states[0 ].power_usage =UINT_MAX ; -strcpy (drv->states[0 ].name,"WFI" ); -strcpy (drv->states[0 ].desc,"ARM WFI" ); +strscpy (drv->states[0 ].name,"WFI" ); +strscpy (drv->states[0 ].desc,"ARM WFI" );/* * If no DT idle states are detected (ret == 0) let the driver -- 2.51.0
Paul Walmsley
maintainerRe: [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
In reply to Thorsten BlumQuoted 4 lines · Thorsten Blum
strcpy()is deprecated; usestrscpy()instead.Signed-off-by Thorsten Blum <[email protected]>
Thanks, I'll plan to queue this one through arch/riscv fixes - unless you'd prefer to take it, Daniel?
- Paul
Re: [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
In reply to Thorsten BlumQuoted 5 lines · Thorsten Blum
strcpy()is deprecated; usestrscpy()instead.Signed-off-by Thorsten Blum <[email protected]>
LGTM.
Reviewed-by Anup Patel <[email protected]>
Regards,
Anup
Quoted 30 lines
--- drivers/cpuidle/cpuidle-riscv-sbi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/cpuidle/cpuidle-riscv-sbi.c +3
-3@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/of.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> #include <linux/pm_runtime.h> @@ -303,8 +304,8 @@ static int sbi_cpuidle_init_cpu(struct device *dev, int cpu) drv->states[0 ].exit_latency =1 ; drv->states[0 ].target_residency =1 ; drv->states[0 ].power_usage =UINT_MAX ; -strcpy (drv->states[0 ].name,"WFI" ); -strcpy (drv->states[0 ].desc,"RISC-V WFI" ); +strscpy (drv->states[0 ].name,"WFI" ); +strscpy (drv->states[0 ].desc,"RISC-V WFI" );/* * If no DT idle states are detected (ret == 0) let the driver -- 2.51.0