[radeon-alex:drm-next-4.17-wip 148/164] drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:281:56: sparse: constant 0xFFFFFFFF00000000 is so big it is unsigned long
kbuild test robot
fengguang.wu at intel.com
Fri Mar 23 05:26:12 UTC 2018
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.17-wip
head: a611dd16c69025b6df115427af0a5d63ae9f5145
commit: 2cac05dee6e309bb21424c7d59c62f662d01309e [148/164] drm/amd/powerplay: add the hw manager for vega12 (v4)
reproduce:
# apt-get install sparse
git checkout 2cac05dee6e309bb21424c7d59c62f662d01309e
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:281:56: sparse: constant 0xFFFFFFFF00000000 is so big it is unsigned long
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:332:85: sparse: constant 0xFFFFFFFF00000000 is so big it is unsigned long
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:93:5: sparse: symbol 'vega12_send_msg_to_smc_without_waiting' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:111:5: sparse: symbol 'vega12_send_msg_to_smc' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:136:5: sparse: symbol 'vega12_send_msg_to_smc_with_parameter' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:167:5: sparse: symbol 'vega12_send_msg_to_smc_with_parameter_without_waiting' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c:551:29: sparse: symbol 'vega12_smu_funcs' was not declared. Should it be static?
--
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_processpptables.c:312:25: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_processpptables.c:294:5: sparse: symbol 'vega12_pp_tables_initialize' was not declared. Should it be static?
--
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:61:27: sparse: symbol 'cast_phw_vega12_power_state' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:71:33: sparse: symbol 'cast_const_phw_vega12_power_state' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1333:5: sparse: symbol 'vega12_display_clock_voltage_request' was not declared. Should it be static?
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1846:69: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MinClock @@ got short [unsigned] [usertype] MinClock @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1846:69: expected unsigned short [unsigned] [usertype] MinClock
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1846:69: got restricted __le16 [usertype] <noident>
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1850:69: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MaxClock @@ got short [unsigned] [usertype] MaxClock @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1850:69: expected unsigned short [unsigned] [usertype] MaxClock
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1850:69: got restricted __le16 [usertype] <noident>
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1854:68: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MinUclk @@ got short [unsigned] [usertype] MinUclk @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1854:68: expected unsigned short [unsigned] [usertype] MinUclk
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1854:68: got restricted __le16 [usertype] <noident>
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1858:68: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MaxUclk @@ got short [unsigned] [usertype] MaxUclk @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1858:68: expected unsigned short [unsigned] [usertype] MaxUclk
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1858:68: got restricted __le16 [usertype] <noident>
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1867:68: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MinClock @@ got short [unsigned] [usertype] MinClock @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1867:68: expected unsigned short [unsigned] [usertype] MinClock
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1867:68: got restricted __le16 [usertype] <noident>
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1871:68: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MaxClock @@ got short [unsigned] [usertype] MaxClock @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1871:68: expected unsigned short [unsigned] [usertype] MaxClock
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1871:68: got restricted __le16 [usertype] <noident>
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1875:67: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MinUclk @@ got short [unsigned] [usertype] MinUclk @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1875:67: expected unsigned short [unsigned] [usertype] MinUclk
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1875:67: got restricted __le16 [usertype] <noident>
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1879:67: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [usertype] MaxUclk @@ got short [unsigned] [usertype] MaxUclk @@
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1879:67: expected unsigned short [unsigned] [usertype] MaxUclk
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:1879:67: got restricted __le16 [usertype] <noident>
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:2017:5: sparse: symbol 'vega12_enable_disable_uvd_dpm' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:2438:5: sparse: symbol 'vega12_hwmgr_init' was not declared. Should it be static?
vim +281 drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega12_smumgr.c
fa969db4 Evan Quan 2018-03-19 274
fa969db4 Evan Quan 2018-03-19 275 int vega12_enable_smc_features(struct pp_hwmgr *hwmgr,
fa969db4 Evan Quan 2018-03-19 276 bool enable, uint64_t feature_mask)
fa969db4 Evan Quan 2018-03-19 277 {
fa969db4 Evan Quan 2018-03-19 278 uint32_t smu_features_low, smu_features_high;
fa969db4 Evan Quan 2018-03-19 279
fa969db4 Evan Quan 2018-03-19 280 smu_features_low = (uint32_t)((feature_mask & SMU_FEATURES_LOW_MASK) >> SMU_FEATURES_LOW_SHIFT);
fa969db4 Evan Quan 2018-03-19 @281 smu_features_high = (uint32_t)((feature_mask & SMU_FEATURES_HIGH_MASK) >> SMU_FEATURES_HIGH_SHIFT);
fa969db4 Evan Quan 2018-03-19 282
fa969db4 Evan Quan 2018-03-19 283 if (enable) {
fa969db4 Evan Quan 2018-03-19 284 PP_ASSERT_WITH_CODE(vega12_send_msg_to_smc_with_parameter(hwmgr,
fa969db4 Evan Quan 2018-03-19 285 PPSMC_MSG_EnableSmuFeaturesLow, smu_features_low) == 0,
fa969db4 Evan Quan 2018-03-19 286 "[EnableDisableSMCFeatures] Attemp to enable SMU features Low failed!",
fa969db4 Evan Quan 2018-03-19 287 return -EINVAL);
fa969db4 Evan Quan 2018-03-19 288 PP_ASSERT_WITH_CODE(vega12_send_msg_to_smc_with_parameter(hwmgr,
fa969db4 Evan Quan 2018-03-19 289 PPSMC_MSG_EnableSmuFeaturesHigh, smu_features_high) == 0,
fa969db4 Evan Quan 2018-03-19 290 "[EnableDisableSMCFeatures] Attemp to enable SMU features High failed!",
fa969db4 Evan Quan 2018-03-19 291 return -EINVAL);
fa969db4 Evan Quan 2018-03-19 292 } else {
fa969db4 Evan Quan 2018-03-19 293 PP_ASSERT_WITH_CODE(vega12_send_msg_to_smc_with_parameter(hwmgr,
fa969db4 Evan Quan 2018-03-19 294 PPSMC_MSG_DisableSmuFeaturesLow, smu_features_low) == 0,
fa969db4 Evan Quan 2018-03-19 295 "[EnableDisableSMCFeatures] Attemp to disable SMU features Low failed!",
fa969db4 Evan Quan 2018-03-19 296 return -EINVAL);
fa969db4 Evan Quan 2018-03-19 297 PP_ASSERT_WITH_CODE(vega12_send_msg_to_smc_with_parameter(hwmgr,
fa969db4 Evan Quan 2018-03-19 298 PPSMC_MSG_DisableSmuFeaturesHigh, smu_features_high) == 0,
fa969db4 Evan Quan 2018-03-19 299 "[EnableDisableSMCFeatures] Attemp to disable SMU features High failed!",
fa969db4 Evan Quan 2018-03-19 300 return -EINVAL);
fa969db4 Evan Quan 2018-03-19 301 }
fa969db4 Evan Quan 2018-03-19 302
fa969db4 Evan Quan 2018-03-19 303 return 0;
fa969db4 Evan Quan 2018-03-19 304 }
fa969db4 Evan Quan 2018-03-19 305
:::::: The code at line 281 was first introduced by commit
:::::: fa969db4addd05aa9bfa58ade0ed6d9c51656762 drm/amd/powerplay: add the smu manager for vega12 (v4)
:::::: TO: Evan Quan <evan.quan at amd.com>
:::::: CC: Alex Deucher <alexander.deucher at amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
More information about the dri-devel
mailing list