drm: verisilicon: vs_drv: Fix type mismatch with gcc14 22/312222/1
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 5 Jun 2024 06:07:11 +0000 (15:07 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 5 Jun 2024 06:13:49 +0000 (15:13 +0900)
Fix type mismatch with gcc14.
NULL pointer should be 0 as int type.

[  272s] drivers/gpu/drm/verisilicon/vs_drv.c: In function 'vs_debugfs_planes_show':
[  272s] drivers/gpu/drm/verisilicon/vs_drv.c:81:42: error: pointer/integer type mismatch in conditional expression [-Wint-conversion]
[  272s]    81 |                state->fb->format->format : "(null)");
[  272s]       |                                          ^
[  272s]   CC      lib/timerqueue.o

Change-Id: I00868d7f6ca94a9c9939d7a68b7fbf6b29f98330
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/gpu/drm/verisilicon/vs_drv.c

index 4f17c39a760f6afe5c52bb55c6d7203c38dc56f6..c4ae02a323fbc63c1c1b3bed17594fba95050bdb 100644 (file)
@@ -78,7 +78,7 @@ static int vs_debugfs_planes_show(struct seq_file *s, void *data)
         seq_printf(s, "\tsrc-pos = " DRM_RECT_FP_FMT "\n",
                DRM_RECT_FP_ARG(&plane_state->status.src));
         seq_printf(s, "\tformat = %p4cc\n", state->fb ?
-               state->fb->format->format : "(null)");
+               state->fb->format->format : 0);
         seq_printf(s, "\trotation = 0x%x\n", state->rotation);
         seq_printf(s, "\ttiling = %u\n",
                plane_state->status.tile_mode);