Skip to content

Commit 5136380

Browse files
osamakaderrafaeljw
authored andcommitted
thermal: hwmon: replace deprecated strcpy() with strscpy()
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>
1 parent e54ddc4 commit 5136380

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/thermal/thermal_hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz)
9696

9797
mutex_lock(&thermal_hwmon_list_lock);
9898
list_for_each_entry(hwmon, &thermal_hwmon_list, node) {
99-
strcpy(type, tz->type);
99+
strscpy(type, tz->type);
100100
strreplace(type, '-', '_');
101101
if (!strcmp(hwmon->type, type)) {
102102
mutex_unlock(&thermal_hwmon_list_lock);

0 commit comments

Comments
 (0)