All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Quan, Evan" <Evan.Quan@amd.com>
To: Chen Wandun <chenwandun@huawei.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: RE: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur
Date: Mon, 18 Nov 2019 08:15:38 +0000	[thread overview]
Message-ID: <MN2PR12MB3344BBBA7F72F9625D71329EE44D0@MN2PR12MB3344.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1574064214-109525-1-git-send-email-chenwandun@huawei.com>

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Chen Wandun <chenwandun@huawei.com>
> Sent: Monday, November 18, 2019 4:04 PM
> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; dri-devel@lists.freedesktop.org
> Cc: chenwandun@huawei.com
> Subject: [PATCH v2] drm/amd/powerplay: return errno code to caller when
> error occur
> 
> return errno code to caller when error occur, and meanwhile remove gcc '-
> Wunused-but-set-variable' warning.
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In
> function vegam_populate_smc_boot_level:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:
> 6: warning: variable result set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 2068eb0..50896e9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct
> pp_hwmgr *hwmgr,
>  	result = phm_find_boot_level(&(data->dpm_table.sclk_table),
>  			data->vbios_boot_state.sclk_bootup_value,
>  			(uint32_t *)&(table->GraphicsBootLevel));
> +	if (result)
> +		return result;
> 
>  	result = phm_find_boot_level(&(data->dpm_table.mclk_table),
>  			data->vbios_boot_state.mclk_bootup_value,
>  			(uint32_t *)&(table->MemoryBootLevel));
> 
> +	if (result)
> +		return result;
> +
>  	table->BootVddc  = data->vbios_boot_state.vddc_bootup_value *
>  			VOLTAGE_SCALE;
>  	table->BootVddci = data->vbios_boot_state.vddci_bootup_value *
> --
> 2.7.4


WARNING: multiple messages have this Message-ID (diff)
From: "Quan, Evan" <Evan.Quan-5C7GfCeVMHo@public.gmane.org>
To: Chen Wandun <chenwandun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: RE: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur
Date: Mon, 18 Nov 2019 08:15:38 +0000	[thread overview]
Message-ID: <MN2PR12MB3344BBBA7F72F9625D71329EE44D0@MN2PR12MB3344.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1574064214-109525-1-git-send-email-chenwandun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Chen Wandun <chenwandun@huawei.com>
> Sent: Monday, November 18, 2019 4:04 PM
> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; dri-devel@lists.freedesktop.org
> Cc: chenwandun@huawei.com
> Subject: [PATCH v2] drm/amd/powerplay: return errno code to caller when
> error occur
> 
> return errno code to caller when error occur, and meanwhile remove gcc '-
> Wunused-but-set-variable' warning.
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In
> function vegam_populate_smc_boot_level:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:
> 6: warning: variable result set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 2068eb0..50896e9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct
> pp_hwmgr *hwmgr,
>  	result = phm_find_boot_level(&(data->dpm_table.sclk_table),
>  			data->vbios_boot_state.sclk_bootup_value,
>  			(uint32_t *)&(table->GraphicsBootLevel));
> +	if (result)
> +		return result;
> 
>  	result = phm_find_boot_level(&(data->dpm_table.mclk_table),
>  			data->vbios_boot_state.mclk_bootup_value,
>  			(uint32_t *)&(table->MemoryBootLevel));
> 
> +	if (result)
> +		return result;
> +
>  	table->BootVddc  = data->vbios_boot_state.vddc_bootup_value *
>  			VOLTAGE_SCALE;
>  	table->BootVddci = data->vbios_boot_state.vddci_bootup_value *
> --
> 2.7.4

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

WARNING: multiple messages have this Message-ID (diff)
From: "Quan, Evan" <Evan.Quan@amd.com>
To: Chen Wandun <chenwandun@huawei.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: RE: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur
Date: Mon, 18 Nov 2019 08:15:38 +0000	[thread overview]
Message-ID: <MN2PR12MB3344BBBA7F72F9625D71329EE44D0@MN2PR12MB3344.namprd12.prod.outlook.com> (raw)
Message-ID: <20191118081538.Mu36D41lfeJWWJdooLM4eRNL6MPhWmG3m9_ebdgX7xg@z> (raw)
In-Reply-To: <1574064214-109525-1-git-send-email-chenwandun@huawei.com>

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Chen Wandun <chenwandun@huawei.com>
> Sent: Monday, November 18, 2019 4:04 PM
> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; dri-devel@lists.freedesktop.org
> Cc: chenwandun@huawei.com
> Subject: [PATCH v2] drm/amd/powerplay: return errno code to caller when
> error occur
> 
> return errno code to caller when error occur, and meanwhile remove gcc '-
> Wunused-but-set-variable' warning.
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In
> function vegam_populate_smc_boot_level:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:
> 6: warning: variable result set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 2068eb0..50896e9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct
> pp_hwmgr *hwmgr,
>  	result = phm_find_boot_level(&(data->dpm_table.sclk_table),
>  			data->vbios_boot_state.sclk_bootup_value,
>  			(uint32_t *)&(table->GraphicsBootLevel));
> +	if (result)
> +		return result;
> 
>  	result = phm_find_boot_level(&(data->dpm_table.mclk_table),
>  			data->vbios_boot_state.mclk_bootup_value,
>  			(uint32_t *)&(table->MemoryBootLevel));
> 
> +	if (result)
> +		return result;
> +
>  	table->BootVddc  = data->vbios_boot_state.vddc_bootup_value *
>  			VOLTAGE_SCALE;
>  	table->BootVddci = data->vbios_boot_state.vddci_bootup_value *
> --
> 2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Quan, Evan" <Evan.Quan@amd.com>
To: Chen Wandun <chenwandun@huawei.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: RE: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur
Date: Mon, 18 Nov 2019 08:15:38 +0000	[thread overview]
Message-ID: <MN2PR12MB3344BBBA7F72F9625D71329EE44D0@MN2PR12MB3344.namprd12.prod.outlook.com> (raw)
Message-ID: <20191118081538.xpqC2-1PGY6gd1xRfYnqpIFONOIcCCxuk36adFVlk-Y@z> (raw)
In-Reply-To: <1574064214-109525-1-git-send-email-chenwandun@huawei.com>

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Chen Wandun <chenwandun@huawei.com>
> Sent: Monday, November 18, 2019 4:04 PM
> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; dri-devel@lists.freedesktop.org
> Cc: chenwandun@huawei.com
> Subject: [PATCH v2] drm/amd/powerplay: return errno code to caller when
> error occur
> 
> return errno code to caller when error occur, and meanwhile remove gcc '-
> Wunused-but-set-variable' warning.
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In
> function vegam_populate_smc_boot_level:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:
> 6: warning: variable result set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 2068eb0..50896e9 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct
> pp_hwmgr *hwmgr,
>  	result = phm_find_boot_level(&(data->dpm_table.sclk_table),
>  			data->vbios_boot_state.sclk_bootup_value,
>  			(uint32_t *)&(table->GraphicsBootLevel));
> +	if (result)
> +		return result;
> 
>  	result = phm_find_boot_level(&(data->dpm_table.mclk_table),
>  			data->vbios_boot_state.mclk_bootup_value,
>  			(uint32_t *)&(table->MemoryBootLevel));
> 
> +	if (result)
> +		return result;
> +
>  	table->BootVddc  = data->vbios_boot_state.vddc_bootup_value *
>  			VOLTAGE_SCALE;
>  	table->BootVddci = data->vbios_boot_state.vddci_bootup_value *
> --
> 2.7.4

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

  reply	other threads:[~2019-11-18  8:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16  3:43 [PATCH] drm/amd/powerplay: remove variable 'result' set but not used Chen Wandun
2019-11-16  3:43 ` Chen Wandun
2019-11-16  3:43 ` Chen Wandun
2019-11-16  3:43 ` Chen Wandun
2019-11-18  6:50 ` Quan, Evan
2019-11-18  6:50   ` Quan, Evan
2019-11-18  6:50   ` Quan, Evan
2019-11-18  7:16   ` Chen Wandun
2019-11-18  7:16     ` Chen Wandun
2019-11-18  7:16     ` Chen Wandun
2019-11-18  8:03 ` [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur Chen Wandun
2019-11-18  8:03   ` Chen Wandun
2019-11-18  8:03   ` Chen Wandun
2019-11-18  8:03   ` Chen Wandun
2019-11-18  8:15   ` Quan, Evan [this message]
2019-11-18  8:15     ` Quan, Evan
2019-11-18  8:15     ` Quan, Evan
2019-11-18  8:15     ` Quan, Evan
2019-11-18 20:24     ` Alex Deucher
2019-11-18 20:24       ` Alex Deucher
2019-11-18 20:24       ` Alex Deucher

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=MN2PR12MB3344BBBA7F72F9625D71329EE44D0@MN2PR12MB3344.namprd12.prod.outlook.com \
    --to=evan.quan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chenwandun@huawei.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.