* [PATCH] drm/amd/powerplay: Remove extra pair of parentheses
@ 2018-02-07 19:10 ` Matthias Kaehlcke
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2018-02-07 19:10 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Zhou, David Airlie, Rex Zhu
Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
Craig Bergstrom, Matthias Kaehlcke
The double parentheses are not needed. Removing them fixes the following
warning when building with clang:
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c:419:29:
error: equality comparison with extraneous parentheses
[-Werror,-Wparentheses-equality]
if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
index 79e5c05571bc..f5b3de29b632 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
@@ -416,7 +416,7 @@ static int tonga_populate_cac_tables(struct pp_hwmgr *hwmgr,
convert_to_vid(vddc_lookup_table->entries[index].us_cac_high);
}
- if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
+ if (data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2) {
/* We are populating vddgfx CAC data to BapmVddgfx table in split mode */
for (count = 0; count < vddgfx_level_count; count++) {
index = phm_get_voltage_index(vddgfx_lookup_table,
--
2.16.0.rc1.238.g530d649a79-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/amd/powerplay: Remove extra pair of parentheses
@ 2018-02-07 19:10 ` Matthias Kaehlcke
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2018-02-07 19:10 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Zhou, David Airlie, Rex Zhu
Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
Matthias Kaehlcke, amd-gfx, Guenter Roeck
The double parentheses are not needed. Removing them fixes the following
warning when building with clang:
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c:419:29:
error: equality comparison with extraneous parentheses
[-Werror,-Wparentheses-equality]
if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
index 79e5c05571bc..f5b3de29b632 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
@@ -416,7 +416,7 @@ static int tonga_populate_cac_tables(struct pp_hwmgr *hwmgr,
convert_to_vid(vddc_lookup_table->entries[index].us_cac_high);
}
- if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
+ if (data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2) {
/* We are populating vddgfx CAC data to BapmVddgfx table in split mode */
for (count = 0; count < vddgfx_level_count; count++) {
index = phm_get_voltage_index(vddgfx_lookup_table,
--
2.16.0.rc1.238.g530d649a79-goog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Remove extra pair of parentheses
2018-02-07 19:10 ` Matthias Kaehlcke
(?)
@ 2018-02-07 19:19 ` Guenter Roeck
2018-02-07 20:48 ` Alex Deucher
-1 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2018-02-07 19:19 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Alex Deucher, Christian König, David Zhou, David Airlie,
Rex Zhu, amd-gfx list, Maling list - DRI developers,
linux-kernel, Guenter Roeck, Justin TerAvest, Craig Bergstrom
On Wed, Feb 7, 2018 at 11:10 AM, Matthias Kaehlcke <mka@chromium.org> wrote:
> The double parentheses are not needed. Removing them fixes the following
> warning when building with clang:
>
> drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c:419:29:
> error: equality comparison with extraneous parentheses
> [-Werror,-Wparentheses-equality]
> if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
> index 79e5c05571bc..f5b3de29b632 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
> @@ -416,7 +416,7 @@ static int tonga_populate_cac_tables(struct pp_hwmgr *hwmgr,
> convert_to_vid(vddc_lookup_table->entries[index].us_cac_high);
> }
>
> - if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
> + if (data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2) {
> /* We are populating vddgfx CAC data to BapmVddgfx table in split mode */
> for (count = 0; count < vddgfx_level_count; count++) {
> index = phm_get_voltage_index(vddgfx_lookup_table,
> --
> 2.16.0.rc1.238.g530d649a79-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Remove extra pair of parentheses
2018-02-07 19:19 ` Guenter Roeck
@ 2018-02-07 20:48 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2018-02-07 20:48 UTC (permalink / raw)
To: Guenter Roeck
Cc: Matthias Kaehlcke, David Zhou, Craig Bergstrom, Justin TerAvest,
David Airlie, linux-kernel, amd-gfx list, Guenter Roeck,
Maling list - DRI developers, Alex Deucher, Rex Zhu,
Christian König
On Wed, Feb 7, 2018 at 2:19 PM, Guenter Roeck <groeck@google.com> wrote:
> On Wed, Feb 7, 2018 at 11:10 AM, Matthias Kaehlcke <mka@chromium.org> wrote:
>> The double parentheses are not needed. Removing them fixes the following
>> warning when building with clang:
>>
>> drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c:419:29:
>> error: equality comparison with extraneous parentheses
>> [-Werror,-Wparentheses-equality]
>> if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
>>
>> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Reviewed-by: Guenter Roeck <groeck@chromium.org>
Applied. Thanks!
Alex
>
>> ---
>> drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
>> index 79e5c05571bc..f5b3de29b632 100644
>> --- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
>> @@ -416,7 +416,7 @@ static int tonga_populate_cac_tables(struct pp_hwmgr *hwmgr,
>> convert_to_vid(vddc_lookup_table->entries[index].us_cac_high);
>> }
>>
>> - if ((data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2)) {
>> + if (data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2) {
>> /* We are populating vddgfx CAC data to BapmVddgfx table in split mode */
>> for (count = 0; count < vddgfx_level_count; count++) {
>> index = phm_get_voltage_index(vddgfx_lookup_table,
>> --
>> 2.16.0.rc1.238.g530d649a79-goog
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-07 20:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 19:10 [PATCH] drm/amd/powerplay: Remove extra pair of parentheses Matthias Kaehlcke
2018-02-07 19:10 ` Matthias Kaehlcke
2018-02-07 19:19 ` Guenter Roeck
2018-02-07 20:48 ` 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.