drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_topology_device
authorMichael Chen <michael.chen@amd.com>
Fri, 3 May 2024 19:31:08 +0000 (15:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 May 2024 22:46:26 +0000 (18:46 -0400)
commit10f624ef239bd136cdcc5bbc626157a57b938a31
tree0196d2fa01a3fd3b7519f1fd3ca415728e353206
parentc4dcb47d46144d8f5b1ace1d8d2fcddeb5dacd8e
drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_topology_device

Currently oem_id is defined as uint8_t[6] and casted to uint64_t*
in some use case. This would lead code scanner to complain about
access beyond. Re-define it in union to enforce 8-byte size and
alignment to avoid potential issue.

Signed-off-by: Michael Chen <michael.chen@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h