]> Gentwo Git Trees - linux/.git/commitdiff
cpuidle: psci: Replace deprecated strcpy in psci_idle_init_cpu
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 21 Oct 2025 13:51:53 +0000 (15:51 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 19 Nov 2025 17:06:50 +0000 (18:06 +0100)
strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/cpuidle/cpuidle-psci.c

index b19bc60cc627bfcd0ae30b5abdd3124d103391a9..e75d85a8f90d71b37a3c25ba05eafd79a571cdad 100644 (file)
@@ -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