drm/amdgpu: Fix unsigned comparison with less than zero in vpe_u1_8_from_fraction()
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Fri, 5 Jan 2024 04:38:58 +0000 (10:08 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jan 2024 23:32:03 +0000 (18:32 -0500)
commit8e8272f0dc22e11b2791dc778b07bd66c208d5a8
treec5375b397da6007126e11d44566fa5cf6a89d7aa
parentfac4ebd79fed60e79cccafdad45a2bb8d3795044
drm/amdgpu: Fix unsigned comparison with less than zero in vpe_u1_8_from_fraction()

The variables 'numerator' and 'denominator', are unsigned 16-bit integer
types, that can never be less than 0.

Thus fixing the below:
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:62 vpe_u1_8_from_fraction() warn: unsigned 'numerator' is never less than zero.
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:63 vpe_u1_8_from_fraction() warn: unsigned 'denominator' is never less than zero.

Cc: Peyton Lee <peytolee@amd.com>
Cc: Lang Yu <lang.yu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Peyton Lee <peyton.lee@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c