projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fe89d0
)
char: move from strlcpy with unused retval to strscpy
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Thu, 18 Aug 2022 20:59:59 +0000
(22:59 +0200)
committer
Jarkko Sakkinen
<jarkko@kernel.org>
Tue, 4 Oct 2022 21:25:56 +0000
(
00:25
+0300)
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link:
https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_ppi.c
patch
|
blob
|
history
diff --git
a/drivers/char/tpm/tpm_ppi.c
b/drivers/char/tpm/tpm_ppi.c
index 40018a73b3cb7e93aa206b012d0afca8a72ce176..bc7b1b4501b3b9441fc7a71495e4f1e7f0973824 100644
(file)
--- a/
drivers/char/tpm/tpm_ppi.c
+++ b/
drivers/char/tpm/tpm_ppi.c
@@
-380,7
+380,7
@@
void tpm_add_ppi(struct tpm_chip *chip)
TPM_PPI_FN_VERSION,
NULL, ACPI_TYPE_STRING);
if (obj) {
- str
l
cpy(chip->ppi_version, obj->string.pointer,
+ str
s
cpy(chip->ppi_version, obj->string.pointer,
sizeof(chip->ppi_version));
ACPI_FREE(obj);
}