Hello YiPeng Chai,
Commit 13c91b5b4378 ("drm/amd/ras: Add rascore unified interface
function") from Mar 17, 2025 (linux-next), leads to the following
Smatch static checker warning:
drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c:531
ras_core_ras_interrupt_detected()
error: we previously assumed 'ras_core' could be null (see line 527)
drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c
525 bool ras_core_ras_interrupt_detected(struct ras_core_context *ras_core)
526 {
527 if (ras_core && ras_core->sys_fn &&
^^^^^^^^
If ras_core is NULL
528 ras_core->sys_fn->detect_ras_interrupt)
529 return ras_core->sys_fn->detect_ras_interrupt(ras_core);
530
--> 531 RAS_DEV_ERR(ras_core->dev, "Failed to detect ras interrupt!\n");
^^^^^^^^^^^^^
Then we are toasted
532 return false;
533 }
regards,
dan carpenter