summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2020-05-01 20:11:41 -0700
committerAlex Deucher <alexander.deucher@amd.com>2020-05-05 13:12:55 -0400
commit54b7feb93fc33c48619472d8b7fce41cc5acafc9 (patch)
treeb879c5ea1de15507f8bf5112240addc94e5ea6e0 /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
parentcf9d811935df2f8775ead12d01a4fa96aae5011d (diff)
downloadlinux-54b7feb93fc33c48619472d8b7fce41cc5acafc9.tar.gz
linux-54b7feb93fc33c48619472d8b7fce41cc5acafc9.tar.bz2
linux-54b7feb93fc33c48619472d8b7fce41cc5acafc9.zip
drm/amdgpu: Avoid integer overflow in amdgpu_device_suspend_display_audio
When building with Clang: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4160:53: warning: overflow in expression; result is -294967296 with type 'long' [-Winteger-overflow] expires = ktime_get_mono_fast_ns() + NSEC_PER_SEC * 4L; ^ 1 warning generated. Multiplication happens first due to order of operations and both NSEC_PER_SEC and 4 are long literals so the expression overflows. To avoid this, make 4 an unsigned long long literal, which matches the type of expires (u64). Fixes: 3f12acc8d6d4 ("drm/amdgpu: put the audio codec into suspend state before gpu reset V3") Link: https://github.com/ClangBuiltLinux/linux/issues/1017 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
0 files changed, 0 insertions, 0 deletions