[PATCH 08/13] drm/amd/display: Replace block with strncpy() in fill_audio_info()
Tom St Denis
tom.stdenis at amd.com
Tue Oct 17 16:19:07 UTC 2017
Replace inlined strncpy with library call.
Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index e371d740b662..c23e6a288666 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2251,11 +2251,9 @@ static void fill_audio_info(struct audio_info *audio_info,
cea_revision = drm_connector->display_info.cea_rev;
- while (i < AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS &&
- edid_caps->display_name[i]) {
- audio_info->display_name[i] = edid_caps->display_name[i];
- i++;
- }
+ strncpy(audio_info->display_name,
+ edid_caps->display_name,
+ AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS - 1);
if (cea_revision >= 3) {
audio_info->mode_count = edid_caps->audio_mode_count;
--
2.12.0
More information about the amd-gfx
mailing list