Messages in this thread Patch in this message | | | Date | Sun, 20 Feb 2022 23:50:19 +0800 | From | kernel test robot <> | Subject | [PATCH] drm/amd/pm: fix returnvar.cocci warnings |
| |
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c:235:5-8: Unneeded variable: "ret". Return "0" on line 243
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Fixes: 068ea8bdc0aa ("drm/amd/pm: add smu_v13_0_5_ppt implementation") CC: Yifan Zhang <yifan1.zhang@amd.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> ---
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next head: ad72a74cfe7edab15aef40519727a388285e7510 commit: 068ea8bdc0aacb3bba3d1392ed41cc1116a671b8 [96/114] drm/amd/pm: add smu_v13_0_5_ppt implementation :::::: branch date: 2 days ago :::::: commit date: 2 days ago
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c @@ -229,18 +229,13 @@ static bool smu_v13_0_5_is_dpm_running(s static int smu_v13_0_5_post_smu_init(struct smu_context *smu) { - /* - struct amdgpu_device *adev = smu->adev; - */ - int ret = 0; - /* allow message will be sent after enable gfxoff on smu 13.0.5 */ /* ret = smu_cmn_send_smc_msg(smu, SMU_MSG_EnableGfxOff, NULL); if (ret) dev_err(adev->dev, "Failed to Enable GfxOff!\n"); */ - return ret; + return 0; } static int smu_v13_0_5_mode_reset(struct smu_context *smu, int type)
| |