[PATCH] drm/amdgpu/powerplay: drop a redundant NULL check
Deucher, Alexander
Alexander.Deucher at amd.com
Tue Nov 15 16:55:44 UTC 2016
> -----Original Message-----
> From: Colin Ian King [mailto:colin.king at canonical.com]
> Sent: Tuesday, November 15, 2016 11:50 AM
> To: Alex Deucher; amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander; Dan Carpenter
> Subject: Re: [PATCH] drm/amdgpu/powerplay: drop a redundant NULL check
>
> On 15/11/16 16:47, Alex Deucher wrote:
> > Left over from an earlier rev of the patch.
> >
> > Cc: Dan Carpenter <dan.carpenter at oracle.com>
> > Cc: Colin King <colin.king at canonical.com>
> > Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> > ---
> > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> > index b0c929dd..13f2b705 100644
> > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> > @@ -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?
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
>
> Colin
More information about the amd-gfx
mailing list