]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/pseries/lparcfg: Replace deprecated strcpy in parse_system_parameter_string
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 13 Oct 2025 13:57:02 +0000 (15:57 +0200)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 2 Jun 2026 05:54:33 +0000 (11:24 +0530)
commitc8f80f95da32618d49c2a068ee561b85655b761d
tree7749a709a7f2e744c066df23e858b6bb2852e3f0
parent457cf3d00dab71b7e74603b6ee96e13c51a8fd3d
powerpc/pseries/lparcfg: Replace deprecated strcpy in parse_system_parameter_string

strcpy() is deprecated; use strscpy() instead. Use the return value of
strscpy() instead of calling strlen() again, and ignore any potential
string truncation since both strings are much shorter than the buffer
size SPLPAR_MAXLENGTH.

Change both if conditions to silence the following checkpatch warnings:

  Comparisons should place the constant on the right side of the test

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/20251013135703.97260-2-thorsten.blum@linux.dev
arch/powerpc/platforms/pseries/lparcfg.c