[PATCH] drm/amdgpu/psp: fix compile warnings on buffer address print
Evan Quan
evan.quan at amd.com
Mon Oct 23 05:46:44 UTC 2017
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
More information about the amd-gfx
mailing list