[PATCH 06/23] drm/amd/display: Fix for outbox1 ring buffer typecasting issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@xxxxxxx>

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

Reported-by: kernel test robot <lkp@xxxxxxxxx>

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

Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@xxxxxxx>
Reviewed-by: Jun Lei <Jun.Lei@xxxxxxx>
Acked-by: Solomon Chiu <solomon.chiu@xxxxxxx>
---
 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
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux