All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Subject: [linux-next:master 6473/6556] drivers/gpu/drm/xe/xe_lrc.c:1921:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int'
Date: Tue, 17 Mar 2026 16:43:30 +0800	[thread overview]
Message-ID: <202603171555.zipH43We-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   95c541ddfb0815a0ea8477af778bb13bb075079a
commit: 65fcf19cb36bf43c893c3444d5bd120006cb843d [6473/6556] drm/xe: Include running dword offset in default_lrc dumps
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260317/202603171555.zipH43We-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260317/202603171555.zipH43We-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/202603171555.zipH43We-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/xe/xe_lrc.c: In function 'dump_mi_command':
>> drivers/gpu/drm/xe/xe_lrc.c:1921:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1921 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_NOOP (%d dwords)\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1922 |                            dw - num_noop - start, inst_header, num_noop);
         |                            ~~~~~~~~~~~~~~~~~~~~~
         |                                          |
         |                                          int
   drivers/gpu/drm/xe/xe_lrc.c:1926:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1926 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_TOPOLOGY_FILTER\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1927 |                            dw - start, inst_header);
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c:1931:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1931 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_BATCH_BUFFER_END\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1932 |                            dw - start, inst_header);
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c:1946:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1946 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_IMM: %d regs\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1947 |                            dw - start, inst_header, (numdw - 1) / 2);
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c:1949:48: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1949 |                         drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010x\n",
         |                                            ~~~~^
         |                                                |
         |                                                long unsigned int
         |                                            %#5x
    1950 |                                    &dw[i] - start, dw[i], dw[i + 1]);
         |                                    ~~~~~~~~~~~~~~
         |                                           |
         |                                           int
   drivers/gpu/drm/xe/xe_lrc.c:1954:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1954 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_LOAD_REGISTER_MEM: %s%s\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1955 |                            dw - start, inst_header,
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c:1959:48: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1959 |                         drm_printf(p, "LRC[%#5lx]  =  - %#6x = %#010llx\n",
         |                                            ~~~~^
         |                                                |
         |                                                long unsigned int
         |                                            %#5x
    1960 |                                    dw - start,
         |                                    ~~~~~~~~~~   
         |                                       |
         |                                       int
   drivers/gpu/drm/xe/xe_lrc.c:1963:48: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1963 |                         drm_printf(p, "LRC[%#5lx]  =  - %*ph (%s)\n",
         |                                            ~~~~^
         |                                                |
         |                                                long unsigned int
         |                                            %#5x
    1964 |                                    dw - start, (int)sizeof(u32) * (numdw - 1),
         |                                    ~~~~~~~~~~   
         |                                       |
         |                                       int
   drivers/gpu/drm/xe/xe_lrc.c:1969:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1969 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] MI_FORCE_WAKEUP\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1970 |                            dw - start, inst_header);
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c:1974:40: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    1974 |                 drm_printf(p, "LRC[%#5lx]  =  [%#010x] unknown MI opcode %#x, likely %d dwords\n",
         |                                    ~~~~^
         |                                        |
         |                                        long unsigned int
         |                                    %#5x
    1975 |                            dw - start, inst_header, opcode, numdw);
         |                            ~~~~~~~~~~   
         |                               |
         |                               int
   drivers/gpu/drm/xe/xe_lrc.c: In function 'dump_gfxpipe_command':


vim +1921 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

                 reply	other threads:[~2026-03-17  8:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202603171555.zipH43We-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dnyaneshwar.bhadane@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.