From: Meenakshikumar Somasundaram <[email protected]>

[WHY]
Compiler warning "pointer to integer of different size" reported on
outbox1 ring buffer address typecasting.

Reported-by: kernel test robot <[email protected]>

[HOW]
Fixed the issue by typecasting with character pointer.

Signed-off-by: Meenakshikumar Somasundaram <[email protected]>
Reviewed-by: Jun Lei <[email protected]>
Acked-by: Solomon Chiu <[email protected]>
---
 drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
index 1ee2000ad099..8ba0a9e2da54 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
@@ -508,7 +508,7 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,
 
                // Initialize outbox1 ring buffer
                rb_params.ctx = dmub;
-               rb_params.base_address = (void *) ((uint64_t) 
(mail_fb->cpu_addr) + DMUB_RB_SIZE);
+               rb_params.base_address = (void *) ((uint8_t *) 
(mail_fb->cpu_addr) + DMUB_RB_SIZE);
                rb_params.capacity = DMUB_RB_SIZE;
                dmub_rb_init(&dmub->outbox1_rb, &rb_params);
 
-- 
2.29.0

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

Reply via email to