[PATCH] drm/amdgpu/psp: fix compile warnings on buffer address print

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

 



drivers/gpu/drm/amd/amdgpu//psp_v3_1.c:389:13:
warning: format â??%xâ?? expects argument of type â??unsigned intâ??, but
argument 4 has type â??struct psp_gfx_rb_frame *â?? [-Wformat=]
   DRM_ERROR("ring_buffer_start = %x; ring_buffer_end = %x; write_frame
= %x\n",
             ^
./include/drm/drmP.h:178:36: note: in definition of macro â??DRM_ERRORâ??
  drm_printk(KERN_ERR, DRM_UT_NONE, fmt, ##__VA_ARGS__)
                                    ^
warning: format â??%xâ?? expects argument of type â??unsigned intâ??, but
argument 5 has type â??struct psp_gfx_rb_frame *â?? [-Wformat=]
   DRM_ERROR("ring_buffer_start = %x; ring_buffer_end = %x; write_frame
= %x\n",
             ^
./include/drm/drmP.h:178:36: note: in definition of macro â??DRM_ERRORâ??
  drm_printk(KERN_ERR, DRM_UT_NONE, fmt, ##__VA_ARGS__)
                                    ^
warning: format â??%xâ?? expects argument of type â??unsigned intâ??, but
argument 6 has type â??struct psp_gfx_rb_frame *â?? [-Wformat=]
   DRM_ERROR("ring_buffer_start = %x; ring_buffer_end = %x; write_frame
= %x\n",
             ^
./include/drm/drmP.h:178:36: note: in definition of macro â??DRM_ERRORâ??
  drm_printk(KERN_ERR, DRM_UT_NONE, fmt, ##__VA_ARGS__)

Change-Id: Ie807eba4594d588561a1d4427ccb2286cc5f5065
Signed-off-by: Evan Quan <evan.quan at amd.com>
Reported-by: Rex Zhu <Rex.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/psp_v3_1.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
index 26e10ab..6b56123 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
@@ -274,7 +274,7 @@ int psp_v10_0_cmd_submit(struct psp_context *psp,
 		write_frame = ring_buffer_start + (psp_write_ptr_reg / rb_frame_size_dw);
 	/* Check invalid write_frame ptr address */
 	if ((write_frame < ring_buffer_start) || (ring_buffer_end < write_frame)) {
-		DRM_ERROR("ring_buffer_start = %x; ring_buffer_end = %x; write_frame = %x\n",
+		DRM_ERROR("ring_buffer_start = %p; ring_buffer_end = %p; write_frame = %p\n",
 				ring_buffer_start,
 				ring_buffer_end,
 				write_frame);
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index d217050..7008569 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -386,7 +386,7 @@ int psp_v3_1_cmd_submit(struct psp_context *psp,
 		write_frame = ring_buffer_start + (psp_write_ptr_reg / rb_frame_size_dw);
 	/* Check invalid write_frame ptr address */
 	if ((write_frame < ring_buffer_start) || (ring_buffer_end < write_frame)) {
-		DRM_ERROR("ring_buffer_start = %x; ring_buffer_end = %x; write_frame = %x\n",
+		DRM_ERROR("ring_buffer_start = %p; ring_buffer_end = %p; write_frame = %p\n",
 				ring_buffer_start,
 				ring_buffer_end,
 				write_frame);
-- 
2.7.4



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

  Powered by Linux