From 7e1de2c27bddcb819d19103e92ce1ed3e4e9c300 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 13 Sep 2023 12:51:49 +0000 Subject: [PATCH] drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar() From Arnd Bergmann fd28ce30b525bccba4504499de625085a6def1c6 in linux-6.1.y/6.1.53 822130b5e8834ab30ad410cf19a582e5014b9a85 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 8bad65c85d4..803e2d9dc72 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -1229,6 +1229,9 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev) u16 cmd; int r; + if (!IS_ENABLED(CONFIG_PHYS_ADDR_T_64BIT)) + return 0; + /* Bypass for VF */ if (amdgpu_sriov_vf(adev)) return 0; -- 2.20.1