[PATCH] drm/xe: Fix coverity issue, overflow_assign

Pravalika Gurram pravalika.gurram at intel.com
Mon Aug 4 13:45:43 UTC 2025


Safe cast of error code from long to int

Fixes: cda06412c0689 ("drm/xe: Wait for migration job before unmapping pages")

Signed-off-by: Pravalika Gurram <pravalika.gurram at intel.com>
---
 drivers/gpu/drm/xe/xe_bo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 1a72561f987c..a1e82c879f1e 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -988,7 +988,7 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
 						     false,
 						     MAX_SCHEDULE_TIMEOUT);
 		if (timeout < 0)
-			ret = timeout;
+			ret = (int)timeout;
 
 		if (IS_VF_CCS_BB_VALID(xe, bo))
 			xe_sriov_vf_ccs_detach_bo(bo);
-- 
2.34.1



More information about the Intel-xe mailing list