drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom_fw.c:115:68: sparse: sparse: Using plain integer as NULL pointer
kernel test robot
build botHi YiPeng,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 50d05c7c76c96b90462f24debacca971d2e86713 commit: d95700604fbc6fd7534303796d005e6efbd1d591 drm/amd/ras: rename core ras_* files and update include guards date: 5 weeks ago config: csky-randconfig-r133-20260910 (https://download.01.org/0day-ci/archive/20260910/[email protected]/config) compiler: csky-linux-gcc (GCC) 15.2.0 sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260910/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Fixes: d95700604fbc ("drm/amd/ras: rename core ras_* files and update include guards")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom_fw.c:115:68: sparse: sparse: Using plain integer as NULL pointer drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom_fw.c:367:56: sparse: sparse: Using plain integer as NULL pointer -- >> drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:274:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:274:15: sparse: expected unsigned int [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:274:15: sparse: got restricted __le32 [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:275:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:275:15: sparse: expected unsigned int [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:275:15: sparse: got restricted __le32 [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:276:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:276:15: sparse: expected unsigned int [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:276:15: sparse: got restricted __le32 [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:277:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:277:15: sparse: expected unsigned int [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:277:15: sparse: got restricted __le32 [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:278:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:278:15: sparse: expected unsigned int [usertype] drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:278:15: sparse: got restricted __le32 [usertype] >> drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:287:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:288:33: sparse: sparse: cast to restricted __le32 drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:289:33: sparse: sparse: cast to restricted __le32 drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:290:33: sparse: sparse: cast to restricted __le32 drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:291:33: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:333:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:333:15: sparse: expected unsigned int [usertype]
drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:333:15: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom.c:343:15: sparse: sparse: cast to restricted __le32
vim +115 drivers/gpu/drm/amd/amdgpu/../ras/core/eeprom_fw.c
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 107
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 108 int ras_fw_set_timestamp(struct ras_core_context *ras_core,
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 109 uint64_t timestamp)
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 110 {
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 111 struct ras_mp1 *mp1 = &ras_core->ras_mp1;
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 112 const struct ras_mp1_sys_func *sys_func = mp1->sys_func;
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 113
0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 114 return sys_func->mp1_send_eeprom_msg(ras_core,0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 @115 RAS_SMU_SetTimestamp, (uint32_t)timestamp, 0);0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 116 } 0d21084c02864f drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c Gangliang Xie 2025-12-12 117
:::::: The code at line 115 was first introduced by commit
:::::: 0d21084c02864fc95df18c5cdd3bab6efafdd406 drm/amd/ras: add wrapper funcs for pmfw eeprom
:::::: TO: Gangliang Xie <[email protected]> :::::: CC: Alex Deucher <[email protected]>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki