Skip to contentSkip to conversation

include/drm/drm_print.h:228:31: warning: '%s' directive argument is null

PATCH kernel test robot 1 participant 1 message Mar 2, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
head:   067a974fd8a9ea43f97ca184e2768b583f2f8c44
commit: 067a974fd8a9ea43f97ca184e2768b583f2f8c44 [6/6] drm/xe: Add performance tunings to debugfs
config: microblaze-allmodconfig (https://download.01.org/0day-ci/archive/20250302/[email protected]/config)
compiler: microblaze-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250302/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from include/drm/ttm/ttm_resource.h:34,

                    from include/drm/ttm/ttm_device.h:30,
                    from drivers/gpu/drm/xe/xe_device_types.h:13,
                    from drivers/gpu/drm/xe/xe_gt_types.h:9,
                    from drivers/gpu/drm/xe/xe_tuning.c:13:
   drivers/gpu/drm/xe/xe_tuning.c: In function 'xe_tuning_dump':
>> include/drm/drm_print.h:228:31: warning: '%s' directive argument is null [-Wformat-overflow=]
     228 |         drm_printf((printer), "%.*s" fmt, (indent), "\t\t\t\t\tX", ##__VA_ARGS__)
         |                               ^~~~~~
   drivers/gpu/drm/xe/xe_tuning.c:226:17: note: in expansion of macro 'drm_printf_indent'
     226 |                 drm_printf_indent(p, 1, "%s\n", engine_tunings[idx].name);
         |                 ^~~~~~~~~~~~~~~~~

vim +228 include/drm/drm_print.h

e2b155e9924c39 Chris Wilson 2017-11-23 220

bf6234a294c5b8 Noralf Trønnes 2017-11-07  221  /**
bf6234a294c5b8 Noralf Trønnes 2017-11-07  222   * drm_printf_indent - Print to a &drm_printer stream with indentation
bf6234a294c5b8 Noralf Trønnes 2017-11-07  223   * @printer: DRM printer
bf6234a294c5b8 Noralf Trønnes 2017-11-07  224   * @indent: Tab indentation level (max 5)
bf6234a294c5b8 Noralf Trønnes 2017-11-07  225   * @fmt: Format string
bf6234a294c5b8 Noralf Trønnes 2017-11-07  226   */
bf6234a294c5b8 Noralf Trønnes 2017-11-07  227  #define drm_printf_indent(printer, indent, fmt, ...) \

bf6234a294c5b8 Noralf Trønnes 2017-11-07 @228 drm_printf((printer), "%.*s" fmt, (indent), "\t\t\t\t\tX", ##__VA_ARGS__)
d8187177b0b195 Rob Clark 2016-11-05 229

:::::: The code at line 228 was first introduced by commit
:::::: bf6234a294c5b8bcc6f47ecdb646f41ad5efddd3 drm/print: Add drm_printf_indent()

:::::: TO: Noralf Trønnes <[email protected]>
:::::: CC: Noralf Trønnes <[email protected]>

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