]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/core: Remove optional 'size' arguments from strscpy() calls
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 10 Mar 2025 19:23:35 +0000 (20:23 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 10 Mar 2025 19:50:30 +0000 (20:50 +0100)
commitfd3f5d385a52531589c8a7a26d9e108aa1d3f52e
tree7ca0a5cea115815bdcc57df89a59acde37ec3283
parent7a310c644cf571fbdb1d447a1dc39cf048634589
perf/core: Remove optional 'size' arguments from strscpy() calls

The 'size' parameter is optional and strscpy() automatically determines
the length of the destination buffer using sizeof() if the argument is
omitted. This makes the explicit sizeof() calls unnecessary.

Furthermore, KSYM_NAME_LEN is equal to sizeof(name) and can also be
removed. Remove them to shorten and simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250310192336.442994-1-thorsten.blum@linux.dev
kernel/events/core.c