public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [linux-next:master 6002/7246] drivers/gpu/drm/xe/xe_lrc.c:1922:7: error: format specifies type 'unsigned long' but the argument has type 'int'
@ 2026-03-19  1:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-19  1:53 UTC (permalink / raw)
  To: Matt Roper; +Cc: llvm, oe-kbuild-all, Dnyaneshwar Bhadane

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   8e42d2514a7e8eb8d740d0ba82339dd6c0b6463f
commit: 65fcf19cb36bf43c893c3444d5bd120006cb843d [6002/7246] drm/xe: Include running dword offset in default_lrc dumps
config: i386-randconfig-017-20260319 (https://download.01.org/0day-ci/archive/20260319/202603190925.XTQEcJ0B-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260319/202603190925.XTQEcJ0B-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603190925.XTQEcJ0B-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/xe/xe_lrc.c:1922:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1921 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_NOOP (%d dwords)\n",
         |                                    ~~~~~
         |                                    %#5x
    1922 |                            dw - num_noop - start, inst_header, num_noop);
         |                            ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1927:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1926 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_TOPOLOGY_FILTER\n",
         |                                    ~~~~~
         |                                    %#5x
    1927 |                            dw - start, inst_header);
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1932:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1931 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_BATCH_BUFFER_END\n",
         |                                    ~~~~~
         |                                    %#5x
    1932 |                            dw - start, inst_header);
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1947:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1946 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_IMM: %d regs\n",
         |                                    ~~~~~
         |                                    %#5x
    1947 |                            dw - start, inst_header, (numdw - 1) / 2);
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1950:8: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1949 |                         drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010x\n",
         |                                            ~~~~~
         |                                            %#5x
    1950 |                                    &dw[i] - start, dw[i], dw[i + 1]);
         |                                    ^~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1955:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1954 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_MEM: %s%s\n",
         |                                    ~~~~~
         |                                    %#5x
    1955 |                            dw - start, inst_header,
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1960:8: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1959 |                         drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010llx\n",
         |                                            ~~~~~
         |                                            %#5x
    1960 |                                    dw - start,
         |                                    ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1964:8: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1963 |                         drm_printf(p, "LRC[%#5lx]  =  - %*ph (%s)\n",
         |                                            ~~~~~
         |                                            %#5x
    1964 |                                    dw - start, (int)sizeof(u32) * (numdw - 1),
         |                                    ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1970:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1969 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_FORCE_WAKEUP\n",
         |                                    ~~~~~
         |                                    %#5x
    1970 |                            dw - start, inst_header);
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:1975:7: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    1974 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] unknown MI opcode %#x, likely %d dwords\n",
         |                                    ~~~~~
         |                                    %#5x
    1975 |                            dw - start, inst_header, opcode, numdw);
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2010:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    2010 |         MATCH(STATE_BASE_ADDRESS);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2002:7: note: expanded from macro 'MATCH'
    2001 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] " #cmd " (%d dwords)\n", \
         |                                    ~~~~~
    2002 |                            dw - start, *dw, numdw); \
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2011:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    2011 |         MATCH(STATE_SIP);
         |         ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2002:7: note: expanded from macro 'MATCH'
    2001 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] " #cmd " (%d dwords)\n", \
         |                                    ~~~~~
    2002 |                            dw - start, *dw, numdw); \
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2012:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    2012 |         MATCH(GPGPU_CSR_BASE_ADDRESS);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2002:7: note: expanded from macro 'MATCH'
    2001 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] " #cmd " (%d dwords)\n", \
         |                                    ~~~~~
    2002 |                            dw - start, *dw, numdw); \
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2013:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    2013 |         MATCH(STATE_COMPUTE_MODE);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2002:7: note: expanded from macro 'MATCH'
    2001 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] " #cmd " (%d dwords)\n", \
         |                                    ~~~~~
    2002 |                            dw - start, *dw, numdw); \
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2014:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
    2014 |         MATCH3D(3DSTATE_BTD);
         |         ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2007:7: note: expanded from macro 'MATCH3D'
    2006 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] " #cmd " (%d dwords)\n", \
         |                                    ~~~~~
    2007 |                            dw - start, *dw, numdw); \
         |                            ^~~~~~~~~~
   drivers/gpu/drm/xe/xe_lrc.c:2015:2: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]


vim +1922 drivers/gpu/drm/xe/xe_lrc.c

  1902	
  1903	static int dump_mi_command(struct drm_printer *p,
  1904				   struct xe_gt *gt,
  1905				   u32 *start,
  1906				   u32 *dw,
  1907				   int remaining_dw)
  1908	{
  1909		u32 inst_header = *dw;
  1910		u32 numdw = instr_dw(inst_header);
  1911		u32 opcode = REG_FIELD_GET(MI_OPCODE, inst_header);
  1912		int num_noop;
  1913	
  1914		/* First check for commands that don't have/use a '# DW' field */
  1915		switch (inst_header & MI_OPCODE) {
  1916		case MI_NOOP:
  1917			num_noop = 1;
  1918			while (num_noop < remaining_dw &&
  1919			       (*(++dw) & REG_GENMASK(31, 23)) == MI_NOOP)
  1920				num_noop++;
  1921			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_NOOP (%d dwords)\n",
> 1922				   dw - num_noop - start, inst_header, num_noop);
  1923			return num_noop;
  1924	
  1925		case MI_TOPOLOGY_FILTER:
  1926			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_TOPOLOGY_FILTER\n",
  1927				   dw - start, inst_header);
  1928			return 1;
  1929	
  1930		case MI_BATCH_BUFFER_END:
  1931			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_BATCH_BUFFER_END\n",
  1932				   dw - start, inst_header);
  1933			/* Return 'remaining_dw' to consume the rest of the LRC */
  1934			return remaining_dw;
  1935		}
  1936	
  1937		/*
  1938		 * Any remaining commands include a # of dwords.  We should make sure
  1939		 * it doesn't exceed the remaining size of the LRC.
  1940		 */
  1941		if (xe_gt_WARN_ON(gt, numdw > remaining_dw))
  1942			numdw = remaining_dw;
  1943	
  1944		switch (inst_header & MI_OPCODE) {
  1945		case MI_LOAD_REGISTER_IMM:
  1946			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_IMM: %d regs\n",
  1947				   dw - start, inst_header, (numdw - 1) / 2);
  1948			for (int i = 1; i < numdw; i += 2)
  1949				drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010x\n",
  1950					   &dw[i] - start, dw[i], dw[i + 1]);
  1951			return numdw;
  1952	
  1953		case MI_LOAD_REGISTER_MEM & MI_OPCODE:
  1954			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_MEM: %s%s\n",
  1955				   dw - start, inst_header,
  1956				   dw[0] & MI_LRI_LRM_CS_MMIO ? "CS_MMIO " : "",
  1957				   dw[0] & MI_LRM_USE_GGTT ? "USE_GGTT " : "");
  1958			if (numdw == 4)
  1959				drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010llx\n",
  1960					   dw - start,
  1961					   dw[1], ((u64)(dw[3]) << 32 | (u64)(dw[2])));
  1962			else
  1963				drm_printf(p, "LRC[%#5lx]  =  - %*ph (%s)\n",
  1964					   dw - start, (int)sizeof(u32) * (numdw - 1),
  1965					   dw + 1, numdw < 4 ? "truncated" : "malformed");
  1966			return numdw;
  1967	
  1968		case MI_FORCE_WAKEUP:
  1969			drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_FORCE_WAKEUP\n",
  1970				   dw - start, inst_header);
  1971			return numdw;
  1972	
  1973		default:
  1974			drm_printf(p, "LRC[%#5lx]  =  [%#010x] unknown MI opcode %#x, likely %d dwords\n",
  1975				   dw - start, inst_header, opcode, numdw);
  1976			return numdw;
  1977		}
  1978	}
  1979	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-19  1:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19  1:53 [linux-next:master 6002/7246] drivers/gpu/drm/xe/xe_lrc.c:1922:7: error: format specifies type 'unsigned long' but the argument has type 'int' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox