aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorRoy Sun <[email protected]>2022-07-20 08:19:50 +0000
committerAlex Deucher <[email protected]>2022-07-28 20:05:14 +0000
commit1f83db6be37c53f6d395a41ee2602e3280ee60c2 (patch)
tree14f96f520644df90b839f3ef0f87ce0254243bda /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentdrm/amdgpu: use adev_to_drm for consistency (diff)
downloadkernel-1f83db6be37c53f6d395a41ee2602e3280ee60c2.tar.gz
kernel-1f83db6be37c53f6d395a41ee2602e3280ee60c2.zip
drm/amdgpu: Fix the incomplete product number
The comments say that the product number is a 16-digit HEX string so the buffer needs to be at least 17 characters to hold the NUL terminator. Expand the buffer size to 20 to avoid the alignment issues. The comment:Product number should only be 16 characters. Any more,and something could be wrong. Cap it at 16 to be safe Signed-off-by: Roy Sun <[email protected]> Reviewed-by: AndrĂ© Almeida <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index b075845a5328..e146810c700b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1020,7 +1020,7 @@ struct amdgpu_device {
bool psp_sysfs_en;
/* Chip product information */
- char product_number[16];
+ char product_number[20];
char product_name[AMDGPU_PRODUCT_NAME_LEN];
char serial[20];