mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
powerpc: Replace strcpy() with strscpy() in proc_ppc64_init()
strcpy() is deprecated; use strscpy() instead. Don't cast the destination buffer from 'u8[]' to 'char *' to satisfy the __must_be_array() requirement of strscpy(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250421183110.436265-1-thorsten.blum@linux.dev
This commit is contained in:
parent
d36e3f11fe
commit
7e99a4a60d
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <linux/proc_fs.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/vdso_datapage.h>
|
||||
|
@ -56,7 +57,7 @@ static int __init proc_ppc64_init(void)
|
|||
{
|
||||
struct proc_dir_entry *pde;
|
||||
|
||||
strcpy((char *)systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
|
||||
strscpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
|
||||
systemcfg->version.major = SYSTEMCFG_MAJOR;
|
||||
systemcfg->version.minor = SYSTEMCFG_MINOR;
|
||||
systemcfg->processor = mfspr(SPRN_PVR);
|
||||
|
|
Loading…
Add table
Reference in a new issue