Skip to contentSkip to conversation

drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment

PATCH Applied Bjorn Helgaas 2 participants 2 messages Feb 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: remove misleading amdgpu_pmops_runtime_idle() comment

From: Bjorn Helgaas <[email protected]>

After 4020c2280233 ("drm/amdgpu: don't runtime suspend if there are displays attached (v3)"), "ret" is unconditionally set later before being used, so there's point in initializing it and the associated comment is no longer meaningful.

Remove the comment and the unnecessary initialization.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -2
index cc69005f5b46..68416e2a9130 100644
@@ -2744,8 +2744,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
 {
 	struct drm_device *drm_dev = dev_get_drvdata(dev);
 	struct amdgpu_device *adev = drm_to_adev(drm_dev);
-	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
-	int ret = 1;
+	int ret;
 
 	if (adev->pm.rpm_mode == AMDGPU_RUNPM_NONE) {
 		pm_runtime_forbid(dev);
Signature · 1 line
2.34.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 32 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

After 4020c2280233 ("drm/amdgpu: don't runtime suspend if there are displays attached (v3)"), "ret" is unconditionally set later before being used, so there's point in initializing it and the associated comment is no longer meaningful.

Remove the comment and the unnecessary initialization.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -3
index cc69005f5b46..68416e2a9130 100644
@@ -2744,8 +2744,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
        struct amdgpu_device *adev = drm_to_adev(drm_dev);
-       /* we don't want the main rpm_idle to call suspend - we want to autosuspend */
-       int ret = 1;
+       int ret;
 
        if (adev->pm.rpm_mode == AMDGPU_RUNPM_NONE) {
                pm_runtime_forbid(dev);
--

2.34.1