oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages
       [not found] <20230315192130.970021-3-desnesn@redhat.com>
@ 2023-03-15 21:46 ` kernel test robot
  2023-03-16  1:32 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-03-15 21:46 UTC (permalink / raw)
  To: Desnes Nunes, iommu, linux-scsi, storagedev, linux-kernel
  Cc: oe-kbuild-all, hch, martin.petersen, don.brace, m.szyprowski,
	robin.murphy, jejb, jsnitsel, Desnes Nunes

Hi Desnes,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master hch-configfs/for-next v6.3-rc2 next-20230315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Desnes-Nunes/dma-debug-small-dma_debug_entry-s-comment-and-variable-name-updates/20230316-032542
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20230315192130.970021-3-desnesn%40redhat.com
patch subject: [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230316/202303160548.ReyuTsGD-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/ae3f8fdd17c54b837d476952733456723c472ed8
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Desnes-Nunes/dma-debug-small-dma_debug_entry-s-comment-and-variable-name-updates/20230316-032542
        git checkout ae3f8fdd17c54b837d476952733456723c472ed8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/dma/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303160548.ReyuTsGD-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from include/linux/dma-map-ops.h:9,
                    from kernel/dma/debug.c:12:
   kernel/dma/debug.c: In function 'debug_dma_dump_mappings':
>> kernel/dma/debug.c:537:42: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 9 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
     537 |                                          "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
     150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   kernel/dma/debug.c:536:33: note: in expansion of macro 'dev_info'
     536 |                                 dev_info(entry->dev,
         |                                 ^~~~~~~~
   kernel/dma/debug.c:537:87: note: format string is defined here
     537 |                                          "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
         |                                                                                    ~~~^
         |                                                                                       |
         |                                                                                       long long unsigned int
         |                                                                                    %x
   kernel/dma/debug.c: In function 'dump_show':
   kernel/dma/debug.c:568:87: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 11 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
     568 |                                    "%s %s %s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
         |                                                                                    ~~~^
         |                                                                                       |
         |                                                                                       long long unsigned int
         |                                                                                    %x
   ......
     574 |                                    cln, dir2name[entry->direction],
         |                                    ~~~                                                 
         |                                    |
         |                                    phys_addr_t {aka unsigned int}


vim +537 kernel/dma/debug.c

   518	
   519	/*
   520	 * Dump mappings entries on kernel space for debugging purposes
   521	 */
   522	void debug_dma_dump_mappings(struct device *dev)
   523	{
   524		int idx;
   525		phys_addr_t cln;
   526	
   527		for (idx = 0; idx < HASH_SIZE; idx++) {
   528			struct hash_bucket *bucket = &dma_entry_hash[idx];
   529			struct dma_debug_entry *entry;
   530			unsigned long flags;
   531	
   532			spin_lock_irqsave(&bucket->lock, flags);
   533			list_for_each_entry(entry, &bucket->list, list) {
   534				if (!dev || dev == entry->dev) {
   535					cln = to_cacheline_number(entry);
   536					dev_info(entry->dev,
 > 537						 "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
   538						 type2name[entry->type], idx,
   539						 phys_addr(entry), entry->pfn,
   540						 entry->dev_addr, entry->size,
   541						 cln, dir2name[entry->direction],
   542						 maperr2str[entry->map_err_type]);
   543				}
   544			}
   545			spin_unlock_irqrestore(&bucket->lock, flags);
   546	
   547			cond_resched();
   548		}
   549	}
   550	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages
       [not found] <20230315192130.970021-3-desnesn@redhat.com>
  2023-03-15 21:46 ` [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages kernel test robot
@ 2023-03-16  1:32 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-03-16  1:32 UTC (permalink / raw)
  To: Desnes Nunes, iommu, linux-scsi, storagedev, linux-kernel
  Cc: llvm, oe-kbuild-all, hch, martin.petersen, don.brace,
	m.szyprowski, robin.murphy, jejb, jsnitsel, Desnes Nunes

Hi Desnes,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Desnes-Nunes/dma-debug-small-dma_debug_entry-s-comment-and-variable-name-updates/20230316-032542
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20230315192130.970021-3-desnesn%40redhat.com
patch subject: [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages
config: arm-randconfig-r046-20230312 (https://download.01.org/0day-ci/archive/20230316/202303160927.dwt0jHFb-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/ae3f8fdd17c54b837d476952733456723c472ed8
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Desnes-Nunes/dma-debug-small-dma_debug_entry-s-comment-and-variable-name-updates/20230316-032542
        git checkout ae3f8fdd17c54b837d476952733456723c472ed8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/dma/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303160927.dwt0jHFb-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/dma/debug.c:541:7: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
                                            cln, dir2name[entry->direction],
                                            ^~~
   include/linux/dev_printk.h:150:67: note: expanded from macro 'dev_info'
           dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                                    ~~~     ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                   _p_func(dev, fmt, ##__VA_ARGS__);                       \
                                ~~~    ^~~~~~~~~~~
   kernel/dma/debug.c:574:8: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
                                      cln, dir2name[entry->direction],
                                      ^~~
   2 warnings generated.


vim +541 kernel/dma/debug.c

   518	
   519	/*
   520	 * Dump mappings entries on kernel space for debugging purposes
   521	 */
   522	void debug_dma_dump_mappings(struct device *dev)
   523	{
   524		int idx;
   525		phys_addr_t cln;
   526	
   527		for (idx = 0; idx < HASH_SIZE; idx++) {
   528			struct hash_bucket *bucket = &dma_entry_hash[idx];
   529			struct dma_debug_entry *entry;
   530			unsigned long flags;
   531	
   532			spin_lock_irqsave(&bucket->lock, flags);
   533			list_for_each_entry(entry, &bucket->list, list) {
   534				if (!dev || dev == entry->dev) {
   535					cln = to_cacheline_number(entry);
   536					dev_info(entry->dev,
   537						 "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n",
   538						 type2name[entry->type], idx,
   539						 phys_addr(entry), entry->pfn,
   540						 entry->dev_addr, entry->size,
 > 541						 cln, dir2name[entry->direction],
   542						 maperr2str[entry->map_err_type]);
   543				}
   544			}
   545			spin_unlock_irqrestore(&bucket->lock, flags);
   546	
   547			cond_resched();
   548		}
   549	}
   550	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-16  1:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230315192130.970021-3-desnesn@redhat.com>
2023-03-15 21:46 ` [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages kernel test robot
2023-03-16  1:32 ` 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;
as well as URLs for NNTP newsgroup(s).