[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202506281925.HHIpXiO7-lkp@intel.com>
Date: Sat, 28 Jun 2025 19:52:57 +0800
From: kernel test robot <lkp@...el.com>
To: Lijo Lazar <lijo.lazar@....com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Alex Deucher <alexander.deucher@....com>, Ce Sun <cesun102@....com>,
Hawking Zhang <Hawking.Zhang@....com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:6088:8-9: Unneeded
variable: "r". Return "0" on line 6141
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aaf724ed69264719550ec4f194d3ab17b886af9a
commit: 785c536c31c0bb057252fddedb30d79ae4979f4b drm/amdgpu: Release reset locks during failures
date: 10 days ago
config: x86_64-randconfig-102-20250628 (https://download.01.org/0day-ci/archive/20250628/202506281925.HHIpXiO7-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
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
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506281925.HHIpXiO7-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:6088:8-9: Unneeded variable: "r". Return "0" on line 6141
vim +6088 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
6080
6081 static int amdgpu_device_halt_activities(
6082 struct amdgpu_device *adev, struct amdgpu_job *job,
6083 struct amdgpu_reset_context *reset_context,
6084 struct list_head *device_list, struct amdgpu_hive_info *hive,
6085 bool need_emergency_restart)
6086 {
6087 struct amdgpu_device *tmp_adev = NULL;
> 6088 int i, r = 0;
6089
6090 /* block all schedulers and reset given job's ring */
6091 list_for_each_entry(tmp_adev, device_list, reset_list) {
6092 amdgpu_device_set_mp1_state(tmp_adev);
6093
6094 /*
6095 * Try to put the audio codec into suspend state
6096 * before gpu reset started.
6097 *
6098 * Due to the power domain of the graphics device
6099 * is shared with AZ power domain. Without this,
6100 * we may change the audio hardware from behind
6101 * the audio driver's back. That will trigger
6102 * some audio codec errors.
6103 */
6104 if (!amdgpu_device_suspend_display_audio(tmp_adev))
6105 tmp_adev->pcie_reset_ctx.audio_suspended = true;
6106
6107 amdgpu_ras_set_error_query_ready(tmp_adev, false);
6108
6109 cancel_delayed_work_sync(&tmp_adev->delayed_init_work);
6110
6111 amdgpu_amdkfd_pre_reset(tmp_adev, reset_context);
6112
6113 /*
6114 * Mark these ASICs to be reset as untracked first
6115 * And add them back after reset completed
6116 */
6117 amdgpu_unregister_gpu_instance(tmp_adev);
6118
6119 drm_client_dev_suspend(adev_to_drm(tmp_adev), false);
6120
6121 /* disable ras on ALL IPs */
6122 if (!need_emergency_restart &&
6123 (!adev->pcie_reset_ctx.occurs_dpc) &&
6124 amdgpu_device_ip_need_full_reset(tmp_adev))
6125 amdgpu_ras_suspend(tmp_adev);
6126
6127 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
6128 struct amdgpu_ring *ring = tmp_adev->rings[i];
6129
6130 if (!amdgpu_ring_sched_ready(ring))
6131 continue;
6132
6133 drm_sched_stop(&ring->sched, job ? &job->base : NULL);
6134
6135 if (need_emergency_restart)
6136 amdgpu_job_stop_all_jobs_on_sched(&ring->sched);
6137 }
6138 atomic_inc(&tmp_adev->gpu_reset_counter);
6139 }
6140
> 6141 return r;
6142 }
6143
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists