Skip to contentSkip to conversation

drm/amdgpu/powerplay: drop a redundant NULL check

PATCH In review Alex Deucher 3 participants 4 messages Nov 15, 2016 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu/powerplay: drop a redundant NULL check

Left over from an earlier rev of the patch.

Cc Dan Carpenter <[email protected]>
Cc Colin King <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
index b0c929dd..13f2b705 100644
@@ -1469,8 +1469,6 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
 						table_info->vddgfx_lookup_table, vv_id, &sclk)) {
 				if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
 							PHM_PlatformCaps_ClockStretcher)) {
-					if (table_info == NULL)
-						return -EINVAL;
 					sclk_table = table_info->vdd_dep_on_sclk;
 
 					for (j = 1; j < sclk_table->count; j++) {
Signature · 6 lines
2.5.5

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

A message that is not in the archive (sent off-list or not yet received): 1479228468-23660-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 15 lines · Alex Deucher

Left over from an earlier rev of the patch.

Cc Dan Carpenter <[email protected]>
Cc Colin King <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
index b0c929dd..13f2b705 100644

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr) · line 1474

Quoted 8 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
@@ -1469,8 +1469,6 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
 						table_info->vddgfx_lookup_table, vv_id, &sclk)) {
 				if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
 							PHM_PlatformCaps_ClockStretcher)) {
-					if (table_info == NULL)
-						return -EINVAL;
 					sclk_table = table_info->vdd_dep_on_sclk;
 
 					for (j = 1; j < sclk_table->count; j++) {

Is there another instance where the table_info == NULL check can be removed in the if (hwmgr->pp_table_version == PP_TABLE_V0) section of the function?

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

A message that is not in the archive (sent off-list or not yet received): 965d822b-1e47-9e2b-5af0-89db6ae95578-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org

#4 lore raw
Quoted 35 lines

-----Original Message-----
From: Colin Ian King [mailto:[email protected]]
Sent: Tuesday, November 15, 2016 11:50 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander; Dan Carpenter
Subject: Re: [PATCH] drm/amdgpu/powerplay: drop a redundant NULL check

Review

Quoted 10 lines · Alex Deucher

Left over from an earlier rev of the patch.

Cc Dan Carpenter <[email protected]>
Cc Colin King <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_get_evv_voltages(struct

Quoted 4 lines

index b0c929dd..13f2b705 100644

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -1469,8 +1469,6 @@ static int smu7_get_evv_voltages(struct

pp_hwmgr *hwmgr)

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_get_evv_voltages(struct · line 1473

Quoted 5 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
 						table_info-
 vddgfx_lookup_table, vv_id, &sclk)) {
 				if (phm_cap_enabled(hwmgr-
 platform_descriptor.platformCaps,
 
	PHM_PlatformCaps_ClockStretcher)) {
Quoted 5 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
-					if (table_info == NULL)
-						return -EINVAL;
 					sclk_table = table_info-

vdd_dep_on_sclk;

Quoted 6 lines
Quoted 2 lines

for (j = 1; j < sclk_table->count; j++) {

Is there another instance where the table_info == NULL check can be removed in the if (hwmgr->pp_table_version == PP_TABLE_V0) section of the function?

I don't think any V0 systems set the clock stretcher cap, but I'm not 100% sure of that so I'd like to leave it for now.

Alex

Quoted 2 lines

Colin

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

#5 lore raw
In reply to a message not in the archive
Quoted 15 lines · Alex Deucher

Left over from an earlier rev of the patch.

Cc Dan Carpenter <[email protected]>
Cc Colin King <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
index b0c929dd..13f2b705 100644

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr) · line 1474

Quoted 8 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
@@ -1469,8 +1469,6 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
 						table_info->vddgfx_lookup_table, vv_id, &sclk)) {
 				if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
 							PHM_PlatformCaps_ClockStretcher)) {
-					if (table_info == NULL)
-						return -EINVAL;
 					sclk_table = table_info->vdd_dep_on_sclk;
 
 					for (j = 1; j < sclk_table->count; j++) {

Thanks Alex.

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