* [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu
@ 2025-10-21 13:51 Thorsten Blum
2025-10-21 13:51 ` [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu Thorsten Blum
2025-10-22 12:58 ` [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Ulf Hansson
0 siblings, 2 replies; 5+ messages in thread
From: Thorsten Blum @ 2025-10-21 13:51 UTC (permalink / raw)
To: Lorenzo Pieralisi, Sudeep Holla, Ulf Hansson, Rafael J. Wysocki,
Daniel Lezcano
Cc: Thorsten Blum, linux-pm, linux-arm-kernel, linux-kernel
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/cpuidle/cpuidle-psci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index b19bc60cc627..e75d85a8f90d 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
2025-10-21 13:51 [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Thorsten Blum
@ 2025-10-21 13:51 ` Thorsten Blum
2025-10-28 6:16 ` Paul Walmsley
2025-10-28 9:58 ` Anup Patel
2025-10-22 12:58 ` [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Ulf Hansson
1 sibling, 2 replies; 5+ messages in thread
From: Thorsten Blum @ 2025-10-21 13:51 UTC (permalink / raw)
To: Anup Patel, Rafael J. Wysocki, Daniel Lezcano, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: Thorsten Blum, linux-pm, linux-riscv, linux-kernel
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/cpuidle/cpuidle-riscv-sbi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
index a360bc4d20b7..19be6475d356 100644
--- a/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu
2025-10-21 13:51 [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Thorsten Blum
2025-10-21 13:51 ` [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu Thorsten Blum
@ 2025-10-22 12:58 ` Ulf Hansson
1 sibling, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2025-10-22 12:58 UTC (permalink / raw)
To: Thorsten Blum
Cc: Lorenzo Pieralisi, Sudeep Holla, Rafael J. Wysocki,
Daniel Lezcano, linux-pm, linux-arm-kernel, linux-kernel
On Tue, 21 Oct 2025 at 15:52, Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/cpuidle/cpuidle-psci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index b19bc60cc627..e75d85a8f90d 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
2025-10-21 13:51 ` [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu Thorsten Blum
@ 2025-10-28 6:16 ` Paul Walmsley
2025-10-28 9:58 ` Anup Patel
1 sibling, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2025-10-28 6:16 UTC (permalink / raw)
To: Thorsten Blum
Cc: Anup Patel, Rafael J. Wysocki, Daniel Lezcano, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-pm, linux-riscv,
linux-kernel
On Tue, 21 Oct 2025, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Thanks, I'll plan to queue this one through arch/riscv fixes - unless
you'd prefer to take it, Daniel?
- Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu
2025-10-21 13:51 ` [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu Thorsten Blum
2025-10-28 6:16 ` Paul Walmsley
@ 2025-10-28 9:58 ` Anup Patel
1 sibling, 0 replies; 5+ messages in thread
From: Anup Patel @ 2025-10-28 9:58 UTC (permalink / raw)
To: Thorsten Blum
Cc: Rafael J. Wysocki, Daniel Lezcano, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, linux-pm, linux-riscv, linux-kernel
On Tue, Oct 21, 2025 at 7:22 PM Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
LGTM.
Reviewed-by: Anup Patel <anup@brainfault.org>
Regards,
Anup
> ---
> drivers/cpuidle/cpuidle-riscv-sbi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index a360bc4d20b7..19be6475d356 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-28 9:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 13:51 [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Thorsten Blum
2025-10-21 13:51 ` [PATCH 2/2] cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu Thorsten Blum
2025-10-28 6:16 ` Paul Walmsley
2025-10-28 9:58 ` Anup Patel
2025-10-22 12:58 ` [PATCH 1/2] cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).