[PATCH 06/23] drm/amd/display: Fix for outbox1 ring buffer typecasting issue
Solomon Chiu
solomon.chiu at amd.com
Mon Mar 15 01:39:53 UTC 2021
From: Meenakshikumar Somasundaram <meenakshikumar.somasundaram at amd.com>
[WHY]
Compiler warning "pointer to integer of different size" reported on
outbox1 ring buffer address typecasting.
Reported-by: kernel test robot <lkp at intel.com>
[HOW]
Fixed the issue by typecasting with character pointer.
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram at amd.com>
Reviewed-by: Jun Lei <Jun.Lei at amd.com>
Acked-by: Solomon Chiu <solomon.chiu at amd.com>
---
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
More information about the amd-gfx
mailing list