* drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c:1812: possible pointless variable ?
@ 2016-06-27 10:00 David Binderman
2016-06-30 16:38 ` [PATCH] Remove unused variable Matthias Beyer
0 siblings, 1 reply; 5+ messages in thread
From: David Binderman @ 2016-06-27 10:00 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David Airlie, dri-devel,
dcb314, Linux Kernel Mailing List
Hello there,
linux-4.7-rc5/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c:1812]:
(style) Variable 'stretch_amount2' is assigned a value that is never
used.
Source code is
else if (stretch_amount == 3 || stretch_amount == 4)
stretch_amount2 = 1;
Suggest either use the variable in some way, or delete it.
Regards
David Binderman
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Remove unused variable
2016-06-27 10:00 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c:1812: possible pointless variable ? David Binderman
@ 2016-06-30 16:38 ` Matthias Beyer
2016-06-30 16:38 ` [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: " Matthias Beyer
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Beyer @ 2016-06-30 16:38 UTC (permalink / raw)
To: linuxdev.baldrick
Cc: alexander.deucher, christian.koenig, airlied, dri-devel, dcb314,
linux-kernel, Rex.Zhu, JinHuiEric.Huang, nils.wallmenius,
Matthias Beyer
Hi,
after reading your email, I created this patch.
**Please note all**: I'm getting into kernel dev right now (again), so I don't
even know how to test-compile this patch, let alone testing it.
You're more than welcome to teach me things.
Matthias Beyer (1):
drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--
2.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
2016-06-30 16:38 ` [PATCH] Remove unused variable Matthias Beyer
@ 2016-06-30 16:38 ` Matthias Beyer
[not found] ` <SN1PR12MB067228EF741040E0D92DB22BFB390@SN1PR12MB0672.namprd12.prod.outlook.com>
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Beyer @ 2016-06-30 16:38 UTC (permalink / raw)
To: linuxdev.baldrick
Cc: alexander.deucher, christian.koenig, airlied, dri-devel, dcb314,
linux-kernel, Rex.Zhu, JinHuiEric.Huang, nils.wallmenius,
Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
---
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
index 64ee78f..1dcd52d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
@@ -1761,7 +1761,7 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
{
uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->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 =
@@ -1806,11 +1806,8 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
}
/* 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 != 3 &&
+ stretch_amount != 4 && stretch_amount != 5) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
[not found] ` <SN1PR12MB067228EF741040E0D92DB22BFB390@SN1PR12MB0672.namprd12.prod.outlook.com>
@ 2016-07-14 17:22 ` Matthias Beyer
2016-07-15 15:46 ` Alex Deucher
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Beyer @ 2016-07-14 17:22 UTC (permalink / raw)
To: Zhu, Rex
Cc: linuxdev.baldrick, Deucher, Alexander, Koenig, Christian,
airlied, dri-devel, dcb314, linux-kernel, Huang, JinHuiEric,
nils.wallmenius
[-- Attachment #1: Type: text/plain, Size: 2931 bytes --]
Hi list,
I just wondered: I send the patch >14 days ago, 9 days ago it was
reviewed by Rex Zhu. As far as I know, it isn't applied by now. At
least I did not get a mail indicating that it was applied.
Are there issues with the patch I missed?
On 05-07-2016 15:06:59, Zhu, Rex wrote:
>
> Yes, stretch_amount2 was not used on Polaris.
>
>
> Patch was Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
>
>
> Thanks.
>
>
> Best Regards
>
> Rex
>
> ________________________________
> From: Matthias Beyer <mail@beyermatthias.de>
> Sent: Friday, July 1, 2016 12:38:49 AM
> To: linuxdev.baldrick@gmail.com
> Cc: Deucher, Alexander; Koenig, Christian; airlied@linux.ie; dri-devel@lists.freedesktop.org; dcb314@hotmail.com; linux-kernel@vger.kernel.org; Zhu, Rex; Huang, JinHuiEric; nils.wallmenius@gmail.com; Matthias Beyer
> Subject: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
>
> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> index 64ee78f..1dcd52d 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> @@ -1761,7 +1761,7 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> {
> uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
> struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->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 =
> @@ -1806,11 +1806,8 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
> }
>
> /* 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 != 3 &&
> + stretch_amount != 4 && stretch_amount != 5) {
> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
> PHM_PlatformCaps_ClockStretcher);
> PP_ASSERT_WITH_CODE(false,
> --
> 2.9.0
>
--
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer
Proudly sent with mutt.
Happily signed with gnupg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
2016-07-14 17:22 ` Matthias Beyer
@ 2016-07-15 15:46 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2016-07-15 15:46 UTC (permalink / raw)
To: Matthias Beyer
Cc: Zhu, Rex, nils.wallmenius, linux-kernel, dri-devel,
linuxdev.baldrick, Huang, JinHuiEric, dcb314, Deucher, Alexander,
Koenig, Christian
On Thu, Jul 14, 2016 at 1:22 PM, Matthias Beyer <mail@beyermatthias.de> wrote:
> Hi list,
>
> I just wondered: I send the patch >14 days ago, 9 days ago it was
> reviewed by Rex Zhu. As far as I know, it isn't applied by now. At
> least I did not get a mail indicating that it was applied.
>
> Are there issues with the patch I missed?
Applied. Sorry for the delay.
Alex
>
> On 05-07-2016 15:06:59, Zhu, Rex wrote:
>>
>> Yes, stretch_amount2 was not used on Polaris.
>>
>>
>> Patch was Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
>>
>>
>> Thanks.
>>
>>
>> Best Regards
>>
>> Rex
>>
>> ________________________________
>> From: Matthias Beyer <mail@beyermatthias.de>
>> Sent: Friday, July 1, 2016 12:38:49 AM
>> To: linuxdev.baldrick@gmail.com
>> Cc: Deucher, Alexander; Koenig, Christian; airlied@linux.ie; dri-devel@lists.freedesktop.org; dcb314@hotmail.com; linux-kernel@vger.kernel.org; Zhu, Rex; Huang, JinHuiEric; nils.wallmenius@gmail.com; Matthias Beyer
>> Subject: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable
>>
>> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
>> ---
>> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++------
>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
>> index 64ee78f..1dcd52d 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
>> @@ -1761,7 +1761,7 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>> {
>> uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
>> struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->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 =
>> @@ -1806,11 +1806,8 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>> }
>>
>> /* 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 != 3 &&
>> + stretch_amount != 4 && stretch_amount != 5) {
>> phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
>> PHM_PlatformCaps_ClockStretcher);
>> PP_ASSERT_WITH_CODE(false,
>> --
>> 2.9.0
>>
>
> --
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
>
> Proudly sent with mutt.
> Happily signed with gnupg.
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-15 15:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 10:00 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c:1812: possible pointless variable ? David Binderman
2016-06-30 16:38 ` [PATCH] Remove unused variable Matthias Beyer
2016-06-30 16:38 ` [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: " Matthias Beyer
[not found] ` <SN1PR12MB067228EF741040E0D92DB22BFB390@SN1PR12MB0672.namprd12.prod.outlook.com>
2016-07-14 17:22 ` Matthias Beyer
2016-07-15 15:46 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).