Skip to contentSkip to conversation

drm/amd/powerplay: suppress the kernel test robot warning

PATCH In review Evan Quan 2 participants 2 messages Aug 14, 2020

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: suppress the kernel test robot warning

Suppress the warning below:
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]

    return ret;
           ^
   drivers/gpu/drm/amd/powerplay/smu_cmn.c:477:6: note: first condition
    if (ret)
        ^
   drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: note: second condition
    return ret;
           ^
Change-Id I4b512008b8fe410fc7974e0483c39206ebec08ca
---
 drivers/gpu/drm/amd/powerplay/smu_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_cmn.c +1 -1
index 968b734baac0..a58ea08cd115 100644
@@ -604,7 +604,7 @@ int smu_cmn_update_table(struct smu_context *smu,
 		memcpy(table_data, table->cpu_addr, table_size);
 	}
 
-	return ret;
+	return 0;
 }
 
 int smu_cmn_write_watermarks_table(struct smu_context *smu)
Signature · 6 lines
2.28.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Evan Quan

Suppress the warning below:
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]

    return ret;
           ^
   drivers/gpu/drm/amd/powerplay/smu_cmn.c:477:6: note: first condition
    if (ret)
        ^
   drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: note: second condition
    return ret;
           ^
Quoted 3 lines
Change-Id I4b512008b8fe410fc7974e0483c39206ebec08ca
Quoted 20 lines
---
 drivers/gpu/drm/amd/powerplay/smu_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smu_cmn.c +1 -2
index 968b734baac0..a58ea08cd115 100644
@@ -604,7 +604,7 @@ int smu_cmn_update_table(struct smu_context *smu,
                memcpy(table_data, table->cpu_addr, table_size);
        }
 
-       return ret;
+       return 0;
 }
 
 int smu_cmn_write_watermarks_table(struct smu_context *smu)
--

2.28.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx