drm/amdgpu: Fix the incomplete product number
Subsystems (2)
PATCH 1/1 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.
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -1019,7 +1019,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 ];
Signature · 1 line
2.34.1
Christian König
maintainerAm 18.07.22 um 14:08 schrieb yehonsun:
Quoted 5 lines
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.
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.
Well first of all you repeated the commit message twice.
Then when it is fixed 16 digit Hex string then we probably don't have a NUL terminator in the first place.
Please double check.
Regards,
Christian.
Quoted 19 lines
Signed-off-by yehonsun <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-1@@ -1019,7 +1019,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 ];