drm/amdgpu: Remove bo.priority compiler warning
Subsystems (2)
PATCH 1/1 drm/amdgpu: Remove bo.priority compiler warning
Addresses this compile warning:
warning: comparison of distinct pointer types lacks a cast [enabled by default]
bo->tbo.priority = min(bo->tbo.priority, TTM_MAX_BO_PRIORITY - 1);
Kent
Quoted 1 line
From
3da9f2d478c048c36a395f92a2bdb49fe04b831eMon Sep 17 00:00:00 2001
From: Kent Russell <[email protected]>
Date: Tue, 14 Feb 2017 12:52:35 -0500
Subject: [PATCH] drm/amdgpu: Remove bo.priority compiler warning
bo->tbo.priority is an unsigned, so casting to int to address the warning shouldn't be an issue
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
@@ -420,7 +420,7 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, bo->tbo.priority =ilog2 (bo->tbo.num_pages);if (kernel) bo->tbo.priority *=2 ; - bo->tbo.priority =min (bo->tbo.priority,TTM_MAX_BO_PRIORITY -1 ); + bo->tbo.priority =min ((int )bo->tbo.priority,TTM_MAX_BO_PRIORITY -1 );if (flags &AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement &TTM_PL_FLAG_VRAM ) {
Signature · 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): daa4edb1-ace7-1640-6ae3-645126a64acc-5C7GfCeVMHo@public.gmane.org
I think Nicolai beat you to this with his patch "drm/ttm: make TTM_MAX_BO_PRIORITY unsigned".
Quoted 6 lines · Kent Russell
Addresses this compile warning:
warning: comparison of distinct pointer types lacks a cast [enabled by default]
bo->tbo.priority=min(bo->tbo.priority, TTM_MAX_BO_PRIORITY - 1);
Quoted 8 lines
Kent
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): b933c715-dd96-977f-077a-1d0f56bda614-5C7GfCeVMHo@public.gmane.org
Yeah, Nicolai was faster than you.
Patch is already reviewed and should be committed.
Christian.
Am 14.02.2017 um 19:30 schrieb Felix Kuehling:
Quoted 15 lines
I think Nicolai beat you to this with his patch "drm/ttm: make
TTM_MAX_BO_PRIORITYunsigned".Quoted 10 lines · Kent Russell
Addresses this compile warning:
warning: comparison of distinct pointer types lacks a cast [enabled by default]
bo->tbo.priority=min(bo->tbo.priority, TTM_MAX_BO_PRIORITY - 1);Kent
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx