include/drm/drm_print.h:524:49: warning: '%4.4s' directive argument is null

From: kernel test robot
Date: Tue Sep 19 2023 - 11:51:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cf0f715623872823a72e451243bbf555d10d032
commit: 48b3207e4ed9e5140c69e229b697373f233419c8 drm/msm/dpu: simplify CDP programming
date: 4 months ago
config: sparc-randconfig-r014-20230610 (https://download.01.org/0day-ci/archive/20230919/202309192301.fMQKWYsm-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230919/202309192301.fMQKWYsm-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309192301.fMQKWYsm-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/drm/drm_mm.h:51,
from include/drm/drm_vma_manager.h:26,
from include/drm/drm_gem.h:40,
from drivers/gpu/drm/msm/msm_drv.h:34,
from drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:20:
In function '_dpu_plane_set_qos_lut',
inlined from 'dpu_plane_sspp_update_pipe' at drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1126:2:
>> include/drm/drm_print.h:524:49: warning: '%4.4s' directive argument is null [-Wformat-overflow=]
524 | #define __drm_dbg(cat, fmt, ...) ___drm_dbg(NULL, cat, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:582:9: note: in expansion of macro '__drm_dbg'
582 | __drm_dbg(DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:29:39: note: in expansion of macro 'DRM_DEBUG_ATOMIC'
29 | #define DPU_DEBUG_PLANE(pl, fmt, ...) DRM_DEBUG_ATOMIC("plane%d " fmt,\
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:291:9: note: in expansion of macro 'DPU_DEBUG_PLANE'
291 | DPU_DEBUG_PLANE(pdpu, "pnum:%d fmt: %4.4s rt:%d fl:%u lut:0x%llx\n",
| ^~~~~~~~~~~~~~~


vim +524 include/drm/drm_print.h

3bf149bd3fe12a Jani Nikula 2019-10-28 522
84ec67288c10fb Jim Cromie 2022-09-11 523 #if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG)
d987150b539271 Wayne Lin 2022-12-23 @524 #define __drm_dbg(cat, fmt, ...) ___drm_dbg(NULL, cat, fmt, ##__VA_ARGS__)
84ec67288c10fb Jim Cromie 2022-09-11 525 #else
84ec67288c10fb Jim Cromie 2022-09-11 526 #define __drm_dbg(cat, fmt, ...) \
16deeb8e18cafd Jim Cromie 2022-09-11 527 _dynamic_func_call_cls(cat, fmt, ___drm_dbg, \
84ec67288c10fb Jim Cromie 2022-09-11 528 cat, fmt, ##__VA_ARGS__)
84ec67288c10fb Jim Cromie 2022-09-11 529 #endif
e820f52577b14c Jim Cromie 2022-09-11 530

:::::: The code at line 524 was first introduced by commit
:::::: d987150b539271b0394f24c1c648d2846662adb4 drm/drm_print: correct format problem

:::::: TO: Wayne Lin <Wayne.Lin@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki