[radeon-alex:amd-staging-dkms-4.13 1333/2206] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:380:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t {aka unsigned int}'

kbuild test robot fengguang.wu at intel.com
Fri Oct 20 07:13:28 UTC 2017


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-dkms-4.13
head:   2b14e1f4fded74b9efeb990869076cebb06d27ee
commit: 521a9dac01416576acda468261e9e6902e59bac5 [1333/2206] port in all files
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 521a9dac01416576acda468261e9e6902e59bac5
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_calc_vbltimestamp_from_scanoutpos':
   include/kcl/kcl_drm.h:345:9: error: too many arguments to function 'drm_calc_vbltimestamp_from_scanoutpos'
     return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error, vblank_time,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:83:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:9,
                    from <command-line>:0:
   include/drm/drm_vblank.h:174:6: note: declared here
    bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'amdgdu_amdkfd_restore_mem_worker':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:217:22: error: 'struct amdgpu_bo' has no member named 'adev'
     adev = mem->data2.bo->adev;
                         ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'alloc_gtt_mem':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:299:48: warning: passing argument 9 of 'amdgpu_bo_create' makes integer from pointer without a cast [-Wint-conversion]
       AMDGPU_GEM_CREATE_CPU_GTT_USWC, NULL, NULL, &((*mem)->data1.bo));
                                                   ^
   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:1976:0,
                    from drivers/gpu/drm/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:10,
                    from <command-line>:0:
   drivers/gpu/drm/amd/amdgpu/amdgpu_object.h:194:5: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'struct amdgpu_bo **'
    int amdgpu_bo_create(struct amdgpu_device *adev,
        ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:298:6: error: too few arguments to function 'amdgpu_bo_create'
     r = amdgpu_bo_create(adev, size, PAGE_SIZE, true, AMDGPU_GEM_DOMAIN_GTT,
         ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:1976:0,
                    from drivers/gpu/drm/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:10,
                    from <command-line>:0:
   drivers/gpu/drm/amd/amdgpu/amdgpu_object.h:194:5: note: declared here
    int amdgpu_bo_create(struct amdgpu_device *adev,
        ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_local_mem_info':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:366:24: warning: left shift count >= width of type [-Wshift-count-overflow]
     address_mask = ~((1UL << 40) - 1);
                           ^~
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock.h:50,
                    from include/linux/kref.h:18,
                    from include/kcl/kcl_kref.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:7,
                    from <command-line>:0:
   include/linux/kern_levels.h:4:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:301:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:376:3: note: in expansion of macro 'pr_err'
      pr_err("amdgpu: vram aperture is out of 40bit address base: 0x%llx limit 0x%llx\n",
      ^~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:301:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:376:3: note: in expansion of macro 'pr_err'
      pr_err("amdgpu: vram aperture is out of 40bit address base: 0x%llx limit 0x%llx\n",
      ^~~~~~
   In file included from include/linux/kernel.h:13:0,
                    from include/linux/list.h:8,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock.h:50,
                    from include/linux/kref.h:18,
                    from include/kcl/kcl_kref.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../backport/backport.h:7,
                    from <command-line>:0:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:380:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
     pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
              ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:380:2: note: in expansion of macro 'pr_debug'
     pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
     ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:380:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
     pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
              ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:380:2: note: in expansion of macro 'pr_debug'
     pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
     ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:385:6: error: 'amdgpu_powerplay' undeclared (first use in this function)
     if (amdgpu_powerplay || adev->pm.funcs->get_mclk)
         ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:385:6: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_max_engine_clock_in_mhz':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:403:6: error: 'amdgpu_powerplay' undeclared (first use in this function)
     if (amdgpu_powerplay)
         ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_cu_info':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:426:33: error: 'struct amdgpu_cu_info' has no member named 'simd_per_cu'
     cu_info->simd_per_cu = acu_info.simd_per_cu;
                                    ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'amdgpu_amdkfd_get_dmabuf_info':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:456:23: error: 'drm_gem_prime_dmabuf_ops' undeclared (first use in this function)
     if (dma_buf->ops != &drm_gem_prime_dmabuf_ops)
                          ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:467:10: error: 'struct amdgpu_bo' has no member named 'initial_domain'
     if (!(bo->initial_domain & (AMDGPU_GEM_DOMAIN_VRAM |
             ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:483:15: error: 'struct amdgpu_bo' has no member named 'initial_domain'
      *flags = (bo->initial_domain & AMDGPU_GEM_DOMAIN_VRAM) ?
                  ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_max_engine_clock_in_mhz':
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:407:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +380 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

   356	
   357	void get_local_mem_info(struct kgd_dev *kgd,
   358					struct kfd_local_mem_info *mem_info)
   359	{
   360		uint64_t address_mask;
   361		resource_size_t aper_limit;
   362		struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
   363	
   364		BUG_ON(kgd == NULL);
   365	
   366		address_mask = ~((1UL << 40) - 1);
   367		aper_limit = adev->mc.aper_base + adev->mc.aper_size;
   368		memset(mem_info, 0, sizeof(*mem_info));
   369		if (!(adev->mc.aper_base & address_mask ||
   370				aper_limit & address_mask)) {
   371			mem_info->local_mem_size_public = adev->mc.visible_vram_size;
   372			mem_info->local_mem_size_private = adev->mc.real_vram_size -
   373					adev->mc.visible_vram_size;
   374			mem_info->vram_width = adev->mc.vram_width;
   375		} else {
   376			pr_err("amdgpu: vram aperture is out of 40bit address base: 0x%llx limit 0x%llx\n",
   377					adev->mc.aper_base, aper_limit);
   378		}
   379	
 > 380		pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
   381				adev->mc.aper_base, aper_limit,
   382				mem_info->local_mem_size_public,
   383				mem_info->local_mem_size_private);
   384	
   385		if (amdgpu_powerplay || adev->pm.funcs->get_mclk)
   386			mem_info->mem_clk_max = amdgpu_dpm_get_mclk(adev, false) / 100;
   387	}
   388	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 61136 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171020/4bf27a57/attachment-0001.gz>


More information about the dri-devel mailing list