[radeon-alex:drm-next 319/414] drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1817:28: sparse: sparse: cast to restricted __le32

kernel test robot lkp at intel.com
Thu Jun 18 00:14:26 UTC 2020


tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next
head:   f59073f6df9b07d94917221486cf5929efa6b315
commit: a5cc9a9321cb7c32ed9d8f6f82e82376bcc04f81 [319/414] drm/amd/powerplay: update powerplay table for sienna_cichlid
config: i386-randconfig-s001-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-rc1-6-g78f577f8-dirty
        git checkout a5cc9a9321cb7c32ed9d8f6f82e82376bcc04f81
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1367:52: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinClock @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1367:52: sparse:     expected unsigned short [usertype] MinClock
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1367:52: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1371:52: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MaxClock @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1371:52: sparse:     expected unsigned short [usertype] MaxClock
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1371:52: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1375:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinUclk @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1375:51: sparse:     expected unsigned short [usertype] MinUclk
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1375:51: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1379:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MaxUclk @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1379:51: sparse:     expected unsigned short [usertype] MaxUclk
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1379:51: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1388:52: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinClock @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1388:52: sparse:     expected unsigned short [usertype] MinClock
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1388:52: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1392:52: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MaxClock @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1392:52: sparse:     expected unsigned short [usertype] MaxClock
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1392:52: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1396:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinUclk @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1396:51: sparse:     expected unsigned short [usertype] MinUclk
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1396:51: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1400:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MaxUclk @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1400:51: sparse:     expected unsigned short [usertype] MaxUclk
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1400:51: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1726:5: sparse: sparse: symbol 'sienna_cichlid_get_dpm_ultimate_freq' was not declared. Should it be static?
   drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1742:5: sparse: sparse: symbol 'sienna_cichlid_set_soft_freq_limited_range' was not declared. Should it be static?
>> drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c:1817:28: sparse: sparse: cast to restricted __le32

vim +1817 drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c

  1800	
  1801	static uint32_t sienna_cichlid_get_max_power_limit(struct smu_context *smu) {
  1802		uint32_t od_limit, max_power_limit;
  1803		struct smu_11_0_7_powerplay_table *powerplay_table = NULL;
  1804		struct smu_table_context *table_context = &smu->smu_table;
  1805		powerplay_table = table_context->power_play_table;
  1806	
  1807		max_power_limit = smu_get_pptable_power_limit(smu);
  1808	
  1809		if (!max_power_limit) {
  1810			// If we couldn't get the table limit, fall back on first-read value
  1811			if (!smu->default_power_limit)
  1812				smu->default_power_limit = smu->power_limit;
  1813			max_power_limit = smu->default_power_limit;
  1814		}
  1815	
  1816		if (smu->od_enabled) {
> 1817			od_limit = le32_to_cpu(powerplay_table->overdrive_table.max[SMU_11_0_7_ODSETTING_POWERPERCENTAGE]);
  1818	
  1819			pr_debug("ODSETTING_POWERPERCENTAGE: %d (default: %d)\n", od_limit, smu->default_power_limit);
  1820	
  1821			max_power_limit *= (100 + od_limit);
  1822			max_power_limit /= 100;
  1823		}
  1824	
  1825		return max_power_limit;
  1826	}
  1827	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34666 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200618/8af51ce3/attachment-0001.gz>


More information about the dri-devel mailing list