* [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 14:58 ` YueHaibing
0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-11-25 14:58 UTC (permalink / raw)
To: evan.quan, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, Prike.Liang, yuehaibing, chenwandun, yukuai3
Cc: amd-gfx, dri-devel, linux-kernel
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
In function vegam_populate_clock_stretcher_data_table:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
It is never used, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
index 50896e9..b0e0d67 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
@@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
struct vegam_smumgr *smu_data =
(struct vegam_smumgr *)(hwmgr->smu_backend);
- uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+ uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
(table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
/* Populate CKS Lookup Table */
- if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
- stretch_amount2 = 0;
- else if (stretch_amount == 3 || stretch_amount == 4)
- stretch_amount2 = 1;
- else {
+ if (!(stretch_amount == 1 || stretch_amount == 2 ||
+ stretch_amount == 5 || stretch_amount == 3 ||
+ stretch_amount == 4)) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 14:58 ` YueHaibing
0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-11-25 14:58 UTC (permalink / raw)
To: evan.quan, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, Prike.Liang, yuehaibing, chenwandun, yukuai3
Cc: amd-gfx, dri-devel, linux-kernel
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
In function vegam_populate_clock_stretcher_data_table:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
It is never used, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
index 50896e9..b0e0d67 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
@@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
struct vegam_smumgr *smu_data =
(struct vegam_smumgr *)(hwmgr->smu_backend);
- uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+ uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
(table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
/* Populate CKS Lookup Table */
- if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
- stretch_amount2 = 0;
- else if (stretch_amount == 3 || stretch_amount == 4)
- stretch_amount2 = 1;
- else {
+ if (!(stretch_amount == 1 || stretch_amount == 2 ||
+ stretch_amount == 5 || stretch_amount == 3 ||
+ stretch_amount == 4)) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 14:58 ` YueHaibing
0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-11-25 14:58 UTC (permalink / raw)
To: evan.quan, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, Prike.Liang, yuehaibing, chenwandun, yukuai3
Cc: dri-devel, amd-gfx, linux-kernel
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
In function vegam_populate_clock_stretcher_data_table:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
It is never used, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
index 50896e9..b0e0d67 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
@@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
struct vegam_smumgr *smu_data =
(struct vegam_smumgr *)(hwmgr->smu_backend);
- uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+ uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
(table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
/* Populate CKS Lookup Table */
- if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
- stretch_amount2 = 0;
- else if (stretch_amount == 3 || stretch_amount == 4)
- stretch_amount2 = 1;
- else {
+ if (!(stretch_amount == 1 || stretch_amount == 2 ||
+ stretch_amount == 5 || stretch_amount == 3 ||
+ stretch_amount == 4)) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 14:58 ` YueHaibing
0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-11-25 14:58 UTC (permalink / raw)
To: evan.quan, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, Prike.Liang, yuehaibing, chenwandun, yukuai3
Cc: dri-devel, amd-gfx, linux-kernel
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
In function vegam_populate_clock_stretcher_data_table:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
It is never used, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
index 50896e9..b0e0d67 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
@@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
struct vegam_smumgr *smu_data =
(struct vegam_smumgr *)(hwmgr->smu_backend);
- uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+ uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
(table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
/* Populate CKS Lookup Table */
- if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
- stretch_amount2 = 0;
- else if (stretch_amount == 3 || stretch_amount == 4)
- stretch_amount2 = 1;
- else {
+ if (!(stretch_amount == 1 || stretch_amount == 2 ||
+ stretch_amount == 5 || stretch_amount == 3 ||
+ stretch_amount == 4)) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
2019-11-25 14:58 ` YueHaibing
(?)
(?)
@ 2019-11-25 15:16 ` Alex Deucher
-1 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2019-11-25 15:16 UTC (permalink / raw)
To: YueHaibing
Cc: Quan, Evan, Deucher, Alexander, Christian Koenig, Chunming Zhou,
Dave Airlie, Daniel Vetter, Prike Liang, Chen Wandun, yu kuai,
Maling list - DRI developers, amd-gfx list, LKML
On Mon, Nov 25, 2019 at 10:00 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
> In function vegam_populate_clock_stretcher_data_table:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
> warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
>
> It is never used, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 50896e9..b0e0d67 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> struct vegam_smumgr *smu_data =
> (struct vegam_smumgr *)(hwmgr->smu_backend);
>
> - uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> + uint8_t i, stretch_amount, volt_offset = 0;
> struct phm_ppt_v1_information *table_info =
> (struct phm_ppt_v1_information *)(hwmgr->pptable);
> struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> (table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
> table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
> /* Populate CKS Lookup Table */
> - if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> - stretch_amount2 = 0;
> - else if (stretch_amount == 3 || stretch_amount == 4)
> - stretch_amount2 = 1;
> - else {
> + if (!(stretch_amount == 1 || stretch_amount == 2 ||
> + stretch_amount == 5 || stretch_amount == 3 ||
> + stretch_amount == 4)) {
> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
> PHM_PlatformCaps_ClockStretcher);
> PP_ASSERT_WITH_CODE(false,
> --
> 2.7.4
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 15:16 ` Alex Deucher
0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2019-11-25 15:16 UTC (permalink / raw)
To: YueHaibing
Cc: Quan, Evan, Deucher, Alexander, Christian Koenig, Chunming Zhou,
Dave Airlie, Daniel Vetter, Prike Liang, Chen Wandun, yu kuai,
Maling list - DRI developers, amd-gfx list, LKML
On Mon, Nov 25, 2019 at 10:00 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
> In function vegam_populate_clock_stretcher_data_table:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
> warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
>
> It is never used, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 50896e9..b0e0d67 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> struct vegam_smumgr *smu_data =
> (struct vegam_smumgr *)(hwmgr->smu_backend);
>
> - uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> + uint8_t i, stretch_amount, volt_offset = 0;
> struct phm_ppt_v1_information *table_info =
> (struct phm_ppt_v1_information *)(hwmgr->pptable);
> struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> (table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
> table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
> /* Populate CKS Lookup Table */
> - if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> - stretch_amount2 = 0;
> - else if (stretch_amount == 3 || stretch_amount == 4)
> - stretch_amount2 = 1;
> - else {
> + if (!(stretch_amount == 1 || stretch_amount == 2 ||
> + stretch_amount == 5 || stretch_amount == 3 ||
> + stretch_amount == 4)) {
> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
> PHM_PlatformCaps_ClockStretcher);
> PP_ASSERT_WITH_CODE(false,
> --
> 2.7.4
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 15:16 ` Alex Deucher
0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2019-11-25 15:16 UTC (permalink / raw)
To: YueHaibing
Cc: Chen Wandun, Dave Airlie, LKML, Maling list - DRI developers,
Prike Liang, amd-gfx list, Deucher, Alexander, yu kuai, Quan,
Evan, Christian Koenig
On Mon, Nov 25, 2019 at 10:00 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
> In function vegam_populate_clock_stretcher_data_table:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
> warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
>
> It is never used, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 50896e9..b0e0d67 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> struct vegam_smumgr *smu_data =
> (struct vegam_smumgr *)(hwmgr->smu_backend);
>
> - uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> + uint8_t i, stretch_amount, volt_offset = 0;
> struct phm_ppt_v1_information *table_info =
> (struct phm_ppt_v1_information *)(hwmgr->pptable);
> struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> (table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
> table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
> /* Populate CKS Lookup Table */
> - if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> - stretch_amount2 = 0;
> - else if (stretch_amount == 3 || stretch_amount == 4)
> - stretch_amount2 = 1;
> - else {
> + if (!(stretch_amount == 1 || stretch_amount == 2 ||
> + stretch_amount == 5 || stretch_amount == 3 ||
> + stretch_amount == 4)) {
> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
> PHM_PlatformCaps_ClockStretcher);
> PP_ASSERT_WITH_CODE(false,
> --
> 2.7.4
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
@ 2019-11-25 15:16 ` Alex Deucher
0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2019-11-25 15:16 UTC (permalink / raw)
To: YueHaibing
Cc: Chunming Zhou, Chen Wandun, Dave Airlie, LKML,
Maling list - DRI developers, Prike Liang, amd-gfx list,
Daniel Vetter, Deucher, Alexander, yu kuai, Quan, Evan,
Christian Koenig
On Mon, Nov 25, 2019 at 10:00 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:
> In function vegam_populate_clock_stretcher_data_table:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29:
> warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable]
>
> It is never used, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> index 50896e9..b0e0d67 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
> @@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> struct vegam_smumgr *smu_data =
> (struct vegam_smumgr *)(hwmgr->smu_backend);
>
> - uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> + uint8_t i, stretch_amount, volt_offset = 0;
> struct phm_ppt_v1_information *table_info =
> (struct phm_ppt_v1_information *)(hwmgr->pptable);
> struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> (table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
> table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
> /* Populate CKS Lookup Table */
> - if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> - stretch_amount2 = 0;
> - else if (stretch_amount == 3 || stretch_amount == 4)
> - stretch_amount2 = 1;
> - else {
> + if (!(stretch_amount == 1 || stretch_amount == 2 ||
> + stretch_amount == 5 || stretch_amount == 3 ||
> + stretch_amount == 4)) {
> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
> PHM_PlatformCaps_ClockStretcher);
> PP_ASSERT_WITH_CODE(false,
> --
> 2.7.4
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-11-26 8:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 14:58 [PATCH -next] drm/amd/powerplay: remove set but not used variable 'stretch_amount2' YueHaibing
2019-11-25 14:58 ` YueHaibing
2019-11-25 14:58 ` YueHaibing
2019-11-25 14:58 ` YueHaibing
2019-11-25 15:16 ` Alex Deucher
2019-11-25 15:16 ` Alex Deucher
2019-11-25 15:16 ` Alex Deucher
2019-11-25 15:16 ` Alex Deucher
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.