dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: rezhu <rezhu-5C7GfCeVMHo@public.gmane.org>
To: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>,
	Dan Carpenter
	<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: "Tom St Denis" <tom.stdenis-5C7GfCeVMHo@public.gmane.org>,
	"David (ChunMing) Zhou"
	<David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
	"David Airlie" <airlied-cv59FeDIM0c@public.gmane.org>,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	"Evan Quan" <evan.quan-5C7GfCeVMHo@public.gmane.org>,
	"Rex Zhu" <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>,
	"Christian K�nig" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] drm/amd/pp: silence a static checker warning
Date: Tue, 27 Mar 2018 16:59:44 +0800	[thread overview]
Message-ID: <d09148ee-c7d7-7248-d1e5-08d349a58199@amd.com> (raw)
In-Reply-To: <20180326033024.GC27239@hr-amur2>

Applied. Thanks.

Best Regards

Rex

On 2018年03月26日 11:30, Huang Rui wrote:
> On Fri, Mar 23, 2018 at 02:39:03PM +0300, Dan Carpenter wrote:
>> This has a static checker warning because "frev" and "crev" can be
>> uninitialized if "info" is NULL.  I just changed the order of the checks
>> so that we check "info" first.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Huang Rui <ray.huang@amd.com>
>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
>> index 75a465f771f0..7b26607c646a 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
>> @@ -319,13 +319,13 @@ static int smu8_get_system_info_data(struct pp_hwmgr *hwmgr)
>>   			GetIndexIntoMasterTable(DATA, IntegratedSystemInfo),
>>   			&size, &frev, &crev);
>>   
>> -	if (crev != 9) {
>> -		pr_err("Unsupported IGP table: %d %d\n", frev, crev);
>> +	if (info == NULL) {
>> +		pr_err("Could not retrieve the Integrated System Info Table!\n");
>>   		return -EINVAL;
>>   	}
>>   
>> -	if (info == NULL) {
>> -		pr_err("Could not retrieve the Integrated System Info Table!\n");
>> +	if (crev != 9) {
>> +		pr_err("Unsupported IGP table: %d %d\n", frev, crev);
>>   		return -EINVAL;
>>   	}
>>   
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2018-03-27  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 11:39 [PATCH] drm/amd/pp: silence a static checker warning Dan Carpenter
2018-03-26  3:30 ` Huang Rui
2018-03-27  8:59   ` rezhu [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=d09148ee-c7d7-7248-d1e5-08d349a58199@amd.com \
    --to=rezhu-5c7gfcevmho@public.gmane.org \
    --cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
    --cc=Rex.Zhu-5C7GfCeVMHo@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=evan.quan-5C7GfCeVMHo@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ray.huang-5C7GfCeVMHo@public.gmane.org \
    --cc=tom.stdenis-5C7GfCeVMHo@public.gmane.org \
    /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