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.

macintosh: move from strlcpy with unused retval to strscpy

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.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Link: https://lore.kernel.org/r/20220818210026.6940-1-wsa+renesas@sang-engineering.com

authored by

Wolfram Sang and committed by
Michael Ellerman
4c14d7a3 14be3756

+2 -2
+2 -2
drivers/macintosh/therm_windtunnel.c
··· 321 321 if (np) { 322 322 of_node_put(np); 323 323 } else { 324 - strlcpy(info.type, "MAC,ds1775", I2C_NAME_SIZE); 324 + strscpy(info.type, "MAC,ds1775", I2C_NAME_SIZE); 325 325 i2c_new_scanned_device(adapter, &info, scan_ds1775, NULL); 326 326 } 327 327 ··· 329 329 if (np) { 330 330 of_node_put(np); 331 331 } else { 332 - strlcpy(info.type, "MAC,adm1030", I2C_NAME_SIZE); 332 + strscpy(info.type, "MAC,adm1030", I2C_NAME_SIZE); 333 333 i2c_new_scanned_device(adapter, &info, scan_adm1030, NULL); 334 334 } 335 335 }