Skip to contentSkip to conversation

drm/amdgpu/smu11: fix warning on 32bit arches

PATCH In review Alex Deucher 2 participants 3 messages Mar 29, 2019 – Apr 2, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/smu11: fix warning on 32bit arches

Fixes
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
on 32 bit platforms.

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +1 -1
index 9d75911ce674..0e4b4b88af24 100644
@@ -527,7 +527,7 @@ static int smu_v11_0_notify_memory_pool_location(struct smu_context *smu)
 	if (memory_pool->size == 0 || memory_pool->cpu_addr == NULL)
 		return ret;
 
-	address = (uint64_t)memory_pool->cpu_addr;
+	address = (uintptr_t)memory_pool->cpu_addr;
 	address_high = (uint32_t)upper_32_bits(address);
 	address_low  = (uint32_t)lower_32_bits(address);
 
Signature · 6 lines
2.20.1

_______________________________________________
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): 20190329191605.16680-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Ping?

Alex

Quoted 25 lines · Alex Deucher

Fixes
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
on 32 bit platforms.

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +1 -2
index 9d75911ce674..0e4b4b88af24 100644
@@ -527,7 +527,7 @@ static int smu_v11_0_notify_memory_pool_location(struct smu_context *smu)
        if (memory_pool->size == 0 || memory_pool->cpu_addr == NULL)
                return ret;
 
-       address = (uint64_t)memory_pool->cpu_addr;
+       address = (uintptr_t)memory_pool->cpu_addr;
        address_high = (uint32_t)upper_32_bits(address);
        address_low  = (uint32_t)lower_32_bits(address);
 
--
Quoted 2 lines

2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Tao Zhou
#3 lore raw
In reply to a message not in the archive

Tao

Quoted 35 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2019年3月30日 3:16
To: [email protected]; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/smu11: fix warning on 32bit arches

Fixes
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] on 32 bit platforms.

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +1 -2
index 9d75911ce674..0e4b4b88af24 100644
@@ -527,7 +527,7 @@ static int
 smu_v11_0_notify_memory_pool_location(struct smu_context *smu)
 	if (memory_pool->size == 0 || memory_pool->cpu_addr == NULL)
 		return ret;
 
-	address = (uint64_t)memory_pool->cpu_addr;
+	address = (uintptr_t)memory_pool->cpu_addr;
 	address_high = (uint32_t)upper_32_bits(address);
 	address_low  = (uint32_t)lower_32_bits(address);
 
--

2.20.1

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