Since strcpy() is deprecated and the last user of it in the thermal
subsystem is thermal_hwmon_lookup_by_type(), replace strcpy() in that
function with strscpy().
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20250903192059.11353-1-osama.abdelkader@gmail.com
[ rjw: Changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
mutex_lock(&thermal_hwmon_list_lock);
list_for_each_entry(hwmon, &thermal_hwmon_list, node) {
- strcpy(type, tz->type);
+ strscpy(type, tz->type);
strreplace(type, '-', '_');
if (!strcmp(hwmon->type, type)) {
mutex_unlock(&thermal_hwmon_list_lock);