Fixes the following coccicheck:

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:384:16-17: WARNING opportunity for 
max()

Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index c694b41f6461..8327efe24b48 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -381,7 +381,7 @@ signed long amdgpu_fence_wait_polling(struct amdgpu_ring 
*ring,
                udelay(2);
                timeout -= 2;
        }
-       return timeout > 0 ? timeout : 0;
+       return max_t(signed long, timeout, 0);
 }
 /**
  * amdgpu_fence_count_emitted - get the count of emitted fences
-- 
2.25.1

Reply via email to