Skip to content

Commit 7ea1db2

Browse files
srishanmalexdeucher
authored andcommitted
drm/radeon: Prefer strscpy over strlcpy calls in radeon_atombios.c
Use the strscpy method instead of strlcpy method. Fixes the below: WARNING: Prefer strscpy over strlcpy Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 6f38bdb commit 7ea1db2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/radeon/radeon_atombios.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
21052105
const char *name = thermal_controller_names[power_info->info.
21062106
ucOverdriveThermalController];
21072107
info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
2108-
strlcpy(info.type, name, sizeof(info.type));
2108+
strscpy(info.type, name, sizeof(info.type));
21092109
i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
21102110
}
21112111
}
@@ -2355,7 +2355,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
23552355
struct i2c_board_info info = { };
23562356
const char *name = pp_lib_thermal_controller_names[controller->ucType];
23572357
info.addr = controller->ucI2cAddress >> 1;
2358-
strlcpy(info.type, name, sizeof(info.type));
2358+
strscpy(info.type, name, sizeof(info.type));
23592359
i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
23602360
}
23612361
} else {

0 commit comments

Comments
 (0)