Re: [PATCH] power: supply: bq25980: replace deprecated strncpy with strscpy

2023-10-20 Thread Sebastian Reichel
On Fri, 20 Oct 2023 19:11:07 +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect bq->model_name to be NUL-terminated based on its usage with > sysfs

[PATCH] power: supply: bq25980: replace deprecated strncpy with strscpy

2023-10-20 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect bq->model_name to be NUL-terminated based on its usage with sysfs_emit and format strings: val->strval is assigned to bq->model_name i