Skip to contentSkip to conversation

drivers/gpu/drm/xe/xe_guc_ct.c:1727:58: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'}

PATCH kernel test robot 1 participant 1 message Jan 28, 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:   cb1f868ca13756c0c18ba54d1591332476760d07
commit: cb1f868ca13756c0c18ba54d1591332476760d07 [3/3] drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump
config: csky-randconfig-002-20250128 (https://download.01.org/0day-ci/archive/20250128/[email protected]/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250128/[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 >>):

drivers/gpu/drm/xe/xe_guc_ct.c: In function 'xe_guc_ct_snapshot_print':

>> drivers/gpu/drm/xe/xe_guc_ct.c:1727:58: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
    1727 |                         drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size);
         |                                                        ~~^     ~~~~~~~~~~~~~~~~~~
         |                                                          |             |
         |                                                          |             size_t {aka unsigned int}
         |                                                          long unsigned int
         |                                                        %x
--
   drivers/gpu/drm/xe/xe_guc_log.c: In function 'xe_guc_log_snapshot_print':
>> drivers/gpu/drm/xe/xe_guc_log.c:207:42: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     207 |         drm_printf(p, "[LOG].length: 0x%lx\n", snapshot->size);
         |                                        ~~^     ~~~~~~~~~~~~~~
         |                                          |             |
         |                                          |             size_t {aka unsigned int}
         |                                          long unsigned int
         |                                        %x

vim +1727 drivers/gpu/drm/xe/xe_guc_ct.c

1703
1704 /**
1705 * xe_guc_ct_snapshot_print - Print out a given GuC CT snapshot.
1706 * @snapshot: GuC CT snapshot object.
1707 * @p: drm_printer where it will be printed out.
1708 *
1709 * This function prints out a given GuC CT snapshot object.
1710 */
1711 void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot,
1712 struct drm_printer *p)
1713 {
1714 if (!snapshot)
1715 return;
1716
1717 if (snapshot->ct_enabled) {
1718 drm_puts(p, "H2G CTB (all sizes in DW):\n");
1719 guc_ctb_snapshot_print(&snapshot->h2g, p);
1720
1721 drm_puts(p, "G2H CTB (all sizes in DW):\n");
1722 guc_ctb_snapshot_print(&snapshot->g2h, p);
1723 drm_printf(p, "\tg2h outstanding: %d\n",
1724 snapshot->g2h_outstanding);
1725
1726 if (snapshot->ctb) {

> 1727				drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size);

1728 xe_print_blob_ascii85(p, "[CTB].data", '\n',
1729 snapshot->ctb, 0, snapshot->ctb_size);
1730 }
1731 } else {
1732 drm_puts(p, "CT disabled\n");
1733 }
1734 }
1735

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