]> git.hungrycats.org Git - linux/commit
drm/amdgpu: fix shift-out-bounds warning of number_instance
authorFeifei Xu <Feifei.Xu@amd.com>
Fri, 15 May 2026 06:48:50 +0000 (14:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 17:49:24 +0000 (13:49 -0400)
commitc04b0430a9b9291ac2ad23a46cd6216c7ef8964f
tree768bb0e2cce93f0acd69e6f9a7e9c8f339eee2ef
parente0a3aa8a6750e8cf067fe2146dc618ffd296d5ef
drm/amdgpu: fix shift-out-bounds warning of number_instance

Clamp number_instance using BIT/BIT_ULL with the <32 check to avoid the
shift-out-bounds warning.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c