[PATCH] drm/radeon: fix variable type

Deucher, Alexander Alexander.Deucher at amd.com
Mon Feb 21 15:18:58 UTC 2022


[Public]

Add:
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=215600
With that:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken at gmail.com>
Sent: Monday, February 21, 2022 6:05 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Koenig, Christian <Christian.Koenig at amd.com>
Subject: [PATCH] drm/radeon: fix variable type

When we switch to dma_resv_wait_timeout() the returned type changes as
well.

Signed-off-by: Christian König <christian.koenig at amd.com>
Fixes: 89aae41d740f ("drm/radeon: use dma_resv_wait_timeout() instead of manually waiting")
---
 drivers/gpu/drm/radeon/radeon_uvd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 377f9cdb5b53..84013faa4756 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -470,8 +470,8 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
         int32_t *msg, msg_type, handle;
         unsigned img_size = 0;
         void *ptr;
-
-       int i, r;
+       long r;
+       int i;

         if (offset & 0x3F) {
                 DRM_ERROR("UVD messages must be 64 byte aligned!\n");
@@ -481,13 +481,13 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
         r = dma_resv_wait_timeout(bo->tbo.base.resv, false, false,
                                   MAX_SCHEDULE_TIMEOUT);
         if (r <= 0) {
-               DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);
+               DRM_ERROR("Failed waiting for UVD message (%ld)!\n", r);
                 return r ? r : -ETIME;
         }

         r = radeon_bo_kmap(bo, &ptr);
         if (r) {
-               DRM_ERROR("Failed mapping the UVD message (%d)!\n", r);
+               DRM_ERROR("Failed mapping the UVD message (%ld)!\n", r);
                 return r;
         }

--
2.25.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220221/b8aa2a81/attachment.htm>


More information about the amd-gfx mailing list