Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuidle: riscv-sbi: Replace deprecated strcpy in sbi_cpuidle_init_cpu

strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20251021135155.1409-2-thorsten.blum@linux.dev
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Thorsten Blum and committed by
Paul Walmsley
2e448567 5228ed2c

+3 -2
+3 -2
drivers/cpuidle/cpuidle-riscv-sbi.c
··· 18 18 #include <linux/module.h> 19 19 #include <linux/of.h> 20 20 #include <linux/slab.h> 21 + #include <linux/string.h> 21 22 #include <linux/platform_device.h> 22 23 #include <linux/pm_domain.h> 23 24 #include <linux/pm_runtime.h> ··· 304 303 drv->states[0].exit_latency = 1; 305 304 drv->states[0].target_residency = 1; 306 305 drv->states[0].power_usage = UINT_MAX; 307 - strcpy(drv->states[0].name, "WFI"); 308 - strcpy(drv->states[0].desc, "RISC-V WFI"); 306 + strscpy(drv->states[0].name, "WFI"); 307 + strscpy(drv->states[0].desc, "RISC-V WFI"); 309 308 310 309 /* 311 310 * If no DT idle states are detected (ret == 0) let the driver