linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 8865/9759] drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:131:40: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int')
@ 2022-05-06 13:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-06 13:08 UTC (permalink / raw)
  To: Jack Xiao
  Cc: llvm, kbuild-all, Linux Memory Management List, Alex Deucher,
	Hawking Zhang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   38a288f5941ef03752887ad86f2d85442358c99a
commit: 32de57e9ef59b6f646849a8bd615b7c978a4fa6d [8865/9759] drm/amdgpu/mes: manage mes doorbell allocation
config: arm-randconfig-r005-20220506 (https://download.01.org/0day-ci/archive/20220506/202205062149.A4sTXbos-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=32de57e9ef59b6f646849a8bd615b7c978a4fa6d
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 32de57e9ef59b6f646849a8bd615b7c978a4fa6d
        # 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 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/

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/gpu/drm/amd/amdgpu/amdgpu_mes.c:131:40: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
           DRM_INFO("max_doorbell_slices=%ld\n", doorbell_process_limit);
                                         ~~~     ^~~~~~~~~~~~~~~~~~~~~~
                                         %u
   include/drm/drm_print.h:498:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:494:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:39:12: warning: unused function 'amdgpu_mes_alloc_process_doorbells' [-Wunused-function]
   static int amdgpu_mes_alloc_process_doorbells(struct amdgpu_device *adev,
              ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:51:13: warning: unused function 'amdgpu_mes_free_process_doorbells' [-Wunused-function]
   static void amdgpu_mes_free_process_doorbells(struct amdgpu_device *adev,
               ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:59:12: warning: unused function 'amdgpu_mes_queue_doorbell_get' [-Wunused-function]
   static int amdgpu_mes_queue_doorbell_get(struct amdgpu_device *adev,
              ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:90:13: warning: unused function 'amdgpu_mes_queue_doorbell_free' [-Wunused-function]
   static void amdgpu_mes_queue_doorbell_free(struct amdgpu_device *adev,
               ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:105:12: warning: unused function 'amdgpu_mes_doorbell_init' [-Wunused-function]
   static int amdgpu_mes_doorbell_init(struct amdgpu_device *adev)
              ^
   6 warnings generated.


vim +131 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

   104	
   105	static int amdgpu_mes_doorbell_init(struct amdgpu_device *adev)
   106	{
   107		size_t doorbell_start_offset;
   108		size_t doorbell_aperture_size;
   109		size_t doorbell_process_limit;
   110	
   111		doorbell_start_offset = (adev->doorbell_index.max_assignment+1) * sizeof(u32);
   112		doorbell_start_offset =
   113			roundup(doorbell_start_offset,
   114				amdgpu_mes_doorbell_process_slice(adev));
   115	
   116		doorbell_aperture_size = adev->doorbell.size;
   117		doorbell_aperture_size =
   118				rounddown(doorbell_aperture_size,
   119					  amdgpu_mes_doorbell_process_slice(adev));
   120	
   121		if (doorbell_aperture_size > doorbell_start_offset)
   122			doorbell_process_limit =
   123				(doorbell_aperture_size - doorbell_start_offset) /
   124				amdgpu_mes_doorbell_process_slice(adev);
   125		else
   126			return -ENOSPC;
   127	
   128		adev->mes.doorbell_id_offset = doorbell_start_offset / sizeof(u32);
   129		adev->mes.max_doorbell_slices = doorbell_process_limit;
   130	
 > 131		DRM_INFO("max_doorbell_slices=%ld\n", doorbell_process_limit);

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

only message in thread, other threads:[~2022-05-06 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-06 13:08 [linux-next:master 8865/9759] drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:131:40: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned 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;
as well as URLs for NNTP newsgroup(s).