All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-tdx:guest 99/136] kernel/dma/swiotlb.c:223:19: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long'
@ 2021-10-09  8:22 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-09  8:22 UTC (permalink / raw)
  To: Chao Gao; +Cc: llvm, kbuild-all, linux-kernel, Kuppuswamy Sathyanarayanan

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

tree:   https://github.com/intel/tdx.git guest
head:   69f7bdc840a2e478fb51fab56121839c7886e2db
commit: 79f9e3e7c5e0554f2fd75addf7b3058099b7afee [99/136] swiotlb: use bitmap to track free slots
config: i386-randconfig-r015-20211009 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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/tdx/commit/79f9e3e7c5e0554f2fd75addf7b3058099b7afee
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest
        git checkout 79f9e3e7c5e0554f2fd75addf7b3058099b7afee
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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 >>):

>> kernel/dma/swiotlb.c:223:19: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
                         __func__, DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP'
   #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
                        ^
   include/uapi/linux/const.h:34:37: note: expanded from macro '__KERNEL_DIV_ROUND_UP'
   #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
                                       ^~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +223 kernel/dma/swiotlb.c

   201	
   202	int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
   203	{
   204		struct io_tlb_mem *mem = &io_tlb_default_mem;
   205		size_t alloc_size;
   206	
   207		if (swiotlb_force == SWIOTLB_NO_FORCE)
   208			return 0;
   209	
   210		/* protect against double initialization */
   211		if (WARN_ON_ONCE(mem->nslabs))
   212			return -ENOMEM;
   213	
   214		alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs));
   215		mem->slots = memblock_alloc(alloc_size, PAGE_SIZE);
   216		if (!mem->slots)
   217			panic("%s: Failed to allocate %zu bytes align=0x%lx\n",
   218			      __func__, alloc_size, PAGE_SIZE);
   219	
   220		mem->bitmap = memblock_alloc(DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
   221		if (!mem->bitmap)
   222			panic("%s: Failed to allocate %zu bytes align=0x%x\n",
 > 223			      __func__, DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
   224	
   225		swiotlb_init_io_tlb_mem(mem, __pa(tlb), nslabs, false);
   226	
   227		if (verbose)
   228			swiotlb_print_info();
   229		swiotlb_set_max_segment(mem->nslabs << IO_TLB_SHIFT);
   230		return 0;
   231	}
   232	

---
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: 30224 bytes --]

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

* [intel-tdx:guest 99/136] kernel/dma/swiotlb.c:223:19: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long'
@ 2021-10-09  8:22 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-09  8:22 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/intel/tdx.git guest
head:   69f7bdc840a2e478fb51fab56121839c7886e2db
commit: 79f9e3e7c5e0554f2fd75addf7b3058099b7afee [99/136] swiotlb: use bitmap to track free slots
config: i386-randconfig-r015-20211009 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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/tdx/commit/79f9e3e7c5e0554f2fd75addf7b3058099b7afee
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest
        git checkout 79f9e3e7c5e0554f2fd75addf7b3058099b7afee
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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 >>):

>> kernel/dma/swiotlb.c:223:19: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
                         __func__, DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:36:22: note: expanded from macro 'DIV_ROUND_UP'
   #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
                        ^
   include/uapi/linux/const.h:34:37: note: expanded from macro '__KERNEL_DIV_ROUND_UP'
   #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
                                       ^~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +223 kernel/dma/swiotlb.c

   201	
   202	int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
   203	{
   204		struct io_tlb_mem *mem = &io_tlb_default_mem;
   205		size_t alloc_size;
   206	
   207		if (swiotlb_force == SWIOTLB_NO_FORCE)
   208			return 0;
   209	
   210		/* protect against double initialization */
   211		if (WARN_ON_ONCE(mem->nslabs))
   212			return -ENOMEM;
   213	
   214		alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs));
   215		mem->slots = memblock_alloc(alloc_size, PAGE_SIZE);
   216		if (!mem->slots)
   217			panic("%s: Failed to allocate %zu bytes align=0x%lx\n",
   218			      __func__, alloc_size, PAGE_SIZE);
   219	
   220		mem->bitmap = memblock_alloc(DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
   221		if (!mem->bitmap)
   222			panic("%s: Failed to allocate %zu bytes align=0x%x\n",
 > 223			      __func__, DIV_ROUND_UP(nslabs, BITS_PER_BYTE), SMP_CACHE_BYTES);
   224	
   225		swiotlb_init_io_tlb_mem(mem, __pa(tlb), nslabs, false);
   226	
   227		if (verbose)
   228			swiotlb_print_info();
   229		swiotlb_set_max_segment(mem->nslabs << IO_TLB_SHIFT);
   230		return 0;
   231	}
   232	

---
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: 30224 bytes --]

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

end of thread, other threads:[~2021-10-09  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09  8:22 [intel-tdx:guest 99/136] kernel/dma/swiotlb.c:223:19: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' kernel test robot
2021-10-09  8:22 ` kernel test robot

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.