mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luben Tuikov <luben.tuikov@amd.com>
To: "Quan, Evan" <Evan.Quan@amd.com>,
	Yu Songping <yusongping@huawei.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] swsmu/amdgpu_smu: Fix the wrong if-condition
Date: Thu, 24 Nov 2022 21:23:11 -0500	[thread overview]
Message-ID: <0a747797-9b1c-ca60-569f-76eea19a08d3@amd.com> (raw)
In-Reply-To: <DM6PR12MB261939876DAFDBA3B25DEB17E40F9@DM6PR12MB2619.namprd12.prod.outlook.com>

Applied!

Thanks,
Luben

On 2022-11-24 05:10, Quan, Evan wrote:
> [AMD Official Use Only - General]
> 
> Reviewed-by: Evan Quan <evan.quan@amd.com>
> 
>> -----Original Message-----
>> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Yu
>> Songping
>> Sent: Thursday, November 24, 2022 9:53 AM
>> To: airlied@gmail.com; daniel@ffwll.ch
>> Cc: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; linux-
>> kernel@vger.kernel.org
>> Subject: [PATCH] swsmu/amdgpu_smu: Fix the wrong if-condition
>>
>> The logical operator '&&' will make
>> smu->ppt_funcs->set_gfx_power_up_by_imu segment fault when
>> ppt_funcs is
>> smu->NULL.
>>
>> Signed-off-by: Yu Songping <yusongping@huawei.com>
>> ---
>>  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> index b880f4d7d67e..1cb728b0b7ee 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> @@ -161,7 +161,7 @@ int smu_get_dpm_freq_range(struct smu_context
>> *smu,
>>
>>  int smu_set_gfx_power_up_by_imu(struct smu_context *smu)  {
>> -     if (!smu->ppt_funcs && !smu->ppt_funcs-
>>> set_gfx_power_up_by_imu)
>> +     if (!smu->ppt_funcs || !smu->ppt_funcs-
>>> set_gfx_power_up_by_imu)
>>               return -EOPNOTSUPP;
>>
>>       return smu->ppt_funcs->set_gfx_power_up_by_imu(smu);
>> --
>> 2.17.1


      reply	other threads:[~2022-11-25  2:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  1:52 Yu Songping
2022-11-24 10:10 ` Quan, Evan
2022-11-25  2:23   ` Luben Tuikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a747797-9b1c-ca60-569f-76eea19a08d3@amd.com \
    --to=luben.tuikov@amd.com \
    --cc=Evan.Quan@amd.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yusongping@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®