aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorAlex Hung <alex.hung@amd.com>2024-05-29 18:05:20 -0600
committerAlex Deucher <alexander.deucher@amd.com>2024-06-14 16:18:25 -0400
commit1608e201df49127376d9fff1284b8b3c5e018440 (patch)
tree328112e65de3fc16b5bdc35e63a346638727432d /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentdrm/amd/display: Remove NO_EFFECT self-assignment (diff)
downloadlinux-rng-1608e201df49127376d9fff1284b8b3c5e018440.tar.xz
linux-rng-1608e201df49127376d9fff1284b8b3c5e018440.zip
drm/amd/display: Explicitly cast v_total to signed in a subtraction
[WHY & HOW] v_total is an uint32_t and subtracting an unsigned to a signed will result in an unsigned which is always >= 0. As a result, the ternary conditions are always true and thus has no effect. This is fixed by casting v_total to signed explicitly. This also avoids v_total subtraction to overflow. This fixes 1 NO_EFFECT, 2 DEADCODE and 2 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
0 files changed, 0 insertions, 0 deletions