LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yuri Nudelman <ynudelman@habana.ai>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Oded Gabbay <ogabbay@kernel.org>
Subject: [ogabbay:habanalabs-next 51/55] drivers/misc/habanalabs/common/debugfs.c:358:76: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'}
Date: Thu, 19 Aug 2021 09:59:13 +0800	[thread overview]
Message-ID: <202108190906.sM7mmI8t-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4442 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head:   7ff0882e4eb53de988df67bc47c0d153dc343962
commit: bff4f13b946858c7fb2c1e56d7b34a4109fae5f7 [51/55] habanalabs: add userptr_lookup node in debugfs
config: arc-randconfig-r043-20210818 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=bff4f13b946858c7fb2c1e56d7b34a4109fae5f7
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay habanalabs-next
        git checkout bff4f13b946858c7fb2c1e56d7b34a4109fae5f7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/misc/habanalabs/common/debugfs.c: In function 'userptr_lookup_show':
>> drivers/misc/habanalabs/common/debugfs.c:358:76: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
     358 |                                         seq_printf(s, " 0x%-18llx  0x%-16llx  %-8u  0x%-16llx %-12llu\n",
         |                                                                      ~~~~~~^
         |                                                                            |
         |                                                                            long long unsigned int
         |                                                                      %-16x
     359 |                                                 dev_entry->userptr_lookup,
     360 |                                                 dma_addr, userptr->pid,
         |                                                 ~~~~~~~~                    
         |                                                 |
         |                                                 dma_addr_t {aka unsigned int}


vim +358 drivers/misc/habanalabs/common/debugfs.c

   322	
   323	static int userptr_lookup_show(struct seq_file *s, void *data)
   324	{
   325		struct hl_debugfs_entry *entry = s->private;
   326		struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
   327		struct scatterlist *sg;
   328		struct hl_userptr *userptr;
   329		bool first = true;
   330		u64 total_npages, npages, sg_start, sg_end;
   331		dma_addr_t dma_addr;
   332		int i;
   333	
   334		spin_lock(&dev_entry->userptr_spinlock);
   335	
   336		list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) {
   337			if (dev_entry->userptr_lookup >= userptr->addr &&
   338			dev_entry->userptr_lookup < userptr->addr + userptr->size) {
   339				total_npages = 0;
   340				for_each_sg(userptr->sgt->sgl, sg, userptr->sgt->nents,
   341						i) {
   342					npages = hl_get_sg_info(sg, &dma_addr);
   343					sg_start = userptr->addr +
   344						total_npages * PAGE_SIZE;
   345					sg_end = userptr->addr +
   346						(total_npages + npages) * PAGE_SIZE;
   347	
   348					if (dev_entry->userptr_lookup >= sg_start &&
   349					    dev_entry->userptr_lookup < sg_end) {
   350						dma_addr += (dev_entry->userptr_lookup -
   351								sg_start);
   352						if (first) {
   353							first = false;
   354							seq_puts(s, "\n");
   355							seq_puts(s, " user virtual address         dma address       pid        region start     region size\n");
   356							seq_puts(s, "---------------------------------------------------------------------------------------\n");
   357						}
 > 358						seq_printf(s, " 0x%-18llx  0x%-16llx  %-8u  0x%-16llx %-12llu\n",
   359							dev_entry->userptr_lookup,
   360							dma_addr, userptr->pid,
   361							userptr->addr, userptr->size);
   362					}
   363					total_npages += npages;
   364				}
   365			}
   366		}
   367	
   368		spin_unlock(&dev_entry->userptr_spinlock);
   369	
   370		if (!first)
   371			seq_puts(s, "\n");
   372	
   373		return 0;
   374	}
   375	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42921 bytes --]

                 reply	other threads:[~2021-08-19  2:00 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=202108190906.sM7mmI8t-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=ynudelman@habana.ai \
    --subject='Re: [ogabbay:habanalabs-next 51/55] drivers/misc/habanalabs/common/debugfs.c:358:76: warning: format '\''%llx'\'' expects argument of type '\''long long unsigned int'\'', but argument 4 has type '\''dma_addr_t'\'' {aka '\''unsigned int'\''}' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).