Received: by 10.223.176.5 with SMTP id f5csp1053132wra; Wed, 7 Feb 2018 11:50:56 -0800 (PST) X-Google-Smtp-Source: AH8x225mDGyEi7NDWDeM/7KUG/V00OcH+EMXpaIG4TEJkwaC2LC35ReQRN4pPiVIjkiIuifkchw/ X-Received: by 2002:a17:902:7c18:: with SMTP id x24-v6mr6967012pll.432.1518033056534; Wed, 07 Feb 2018 11:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518033056; cv=none; d=google.com; s=arc-20160816; b=tD4GWquqGaLcHHCnEywGE6V2oFFRgp5wEYtfJGyq8yrz3cd8HPgMMJNrwclnEnBJ+l IUpY9J3ySMH2Y4ryWbijP5jeeGrbuuiZE3jUrPjZz35tJeGxaqXIj3iZd7S1VMklc/SM 76YU+slDaCmd0HOLlwcSLgLE5lPHJLZ3iljCjVmortVkg9FV8scKGyfSIdhr/XfVk5qb xnSFOvYQe5Wav6MloJ9Zm0BKl0idu0zA1j8MtrVX9yAThIgXueDp2hZNdC43DL/cQkeY HxWIPww69dKwaCTxK+wlfX1QYaQhhnep2V6lgdsUvApLxcmy6DBgffHIeOuT4sDSRyvi 8qDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hpO1qynmu6DFsRc26rnKLhobtq8Br7MIIrjiP1gg4+8=; b=F8t1u8syRA319q7p8Zk2feE79sXpQ7T6qi4eWswI/MZh+/xUR4cdpZNrDr4Da+LvKr EzVegpmFfesZ6yamL2b+5OF26XkhdHHBg9Ik7nyOV6HtT5m+zwmf0/AQ7HmQBNBwhjDV 6RoZF3sZUhHtK7jPdLQnh6PbQnFWge0xqmmmvunTqQPZBluiG3oShu2rmHwLHq9nvMXc kQGlDE64jhGi7ta7gDEtNskCaoRGz3JaFglcbSPMfnVKfGLmZEzHFpA3EM31fJ4nqxJZ hkbZtwEHLLekk2BybOK/5n50zEcrLIrZH03who0HOMde15sEmfRPIdksLCHZjsrf3NYT IMLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si1558908pfe.402.2018.02.07.11.50.42; Wed, 07 Feb 2018 11:50:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754154AbeBGTtk (ORCPT + 99 others); Wed, 7 Feb 2018 14:49:40 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:45351 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754438AbeBGTtg (ORCPT ); Wed, 7 Feb 2018 14:49:36 -0500 Received: by mail-pf0-f193.google.com with SMTP id w83so771397pfi.12 for ; Wed, 07 Feb 2018 11:49:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hpO1qynmu6DFsRc26rnKLhobtq8Br7MIIrjiP1gg4+8=; b=ISby9ijF2mTiVVY6nZSvoPx2XFnmcP89ZjRPS69ToiQAMgasT0VjxShp/LJVwBvqNy qMj8OQXsSqg2Iyqfypwo03xZnA9VYdHFHj1BBfFYelYf4apMWz4lsLw65ZSZHgaCKihx vYv5U8TkJ3nAgGTb7/qWpTMhptzcb4iIIemcLDfK8EEqHbB3cz2imFLsfK3ccIl5Rhtv VNbEw/Wbc24UQufwSRTaXasuRb7Yp2HnMv+6BpDRsM7+JmRSKVTEO+sh6jMfl4w1vzN2 YE1lydBymhwmYxLswu9G4E+bcKl5hzHe5CVGHDlF8TTwXsLjyXGfgR83gjci2sSyrbWH HyRg== X-Gm-Message-State: APf1xPDx2ebdCixnarIXTF0Q8XU8AoeZ72oz4FI3Ef3cEUB269cSs7Q9 EXkXAi2/8JkkZ90eZCuK+NWikg== X-Received: by 10.99.143.69 with SMTP id r5mr841379pgn.160.1518032975967; Wed, 07 Feb 2018 11:49:35 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id z90sm7011766pfd.78.2018.02.07.11.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 11:49:34 -0800 (PST) From: Matthias Kaehlcke To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Zhou , David Airlie , Harry Wentland , Tony Cheng , Dmytro Laktyushkin , Joshua Aberback Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck , Justin TerAvest , Craig Bergstrom , Matthias Kaehlcke Subject: [PATCH] drm/amd/display: Remove extra pairs of parentheses in dce_calcs.c Date: Wed, 7 Feb 2018 11:49:28 -0800 Message-Id: <20180207194928.93869-1-mka@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The double parentheses are not needed. Removing them fixes multiple warnings like this when building with clang: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:617:42: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((data->graphics_micro_tile_mode == bw_def_rotated_micro_tiling)) { Signed-off-by: Matthias Kaehlcke --- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c index 2e11fac2a63d..bb03a9c64d5a 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c @@ -623,7 +623,7 @@ static void calculate_bandwidth( } else { /*graphics portrait tiling mode*/ - if ((data->graphics_micro_tile_mode == bw_def_rotated_micro_tiling)) { + if (data->graphics_micro_tile_mode == bw_def_rotated_micro_tiling) { data->orthogonal_rotation[i] = 0; } else { @@ -634,7 +634,7 @@ static void calculate_bandwidth( else { if ((i < 4)) { /*underlay landscape tiling mode is only supported*/ - if ((data->underlay_micro_tile_mode == bw_def_display_micro_tiling)) { + if (data->underlay_micro_tile_mode == bw_def_display_micro_tiling) { data->orthogonal_rotation[i] = 0; } else { @@ -643,7 +643,7 @@ static void calculate_bandwidth( } else { /*graphics landscape tiling mode*/ - if ((data->graphics_micro_tile_mode == bw_def_display_micro_tiling)) { + if (data->graphics_micro_tile_mode == bw_def_display_micro_tiling) { data->orthogonal_rotation[i] = 0; } else { @@ -947,14 +947,14 @@ static void calculate_bandwidth( } for (i = 0; i <= maximum_number_of_surfaces - 1; i++) { if (data->enable[i]) { - if ((data->number_of_displays == 1 && data->number_of_underlay_surfaces == 0)) { + if (data->number_of_displays == 1 && data->number_of_underlay_surfaces == 0) { /*set maximum chunk limit if only one graphic pipe is enabled*/ data->outstanding_chunk_request_limit[i] = bw_int_to_fixed(127); } else { data->outstanding_chunk_request_limit[i] = bw_ceil2(bw_div(data->adjusted_data_buffer_size[i], data->pipe_chunk_size_in_bytes[i]), bw_int_to_fixed(1)); /*clamp maximum chunk limit in the graphic display pipe*/ - if ((i >= 4)) { + if (i >= 4) { data->outstanding_chunk_request_limit[i] = bw_max2(bw_int_to_fixed(127), data->outstanding_chunk_request_limit[i]); } } @@ -1337,7 +1337,7 @@ static void calculate_bandwidth( /*if stutter and dram clock state change are gated before cursor then the cursor latency hiding does not limit stutter or dram clock state change*/ for (i = 0; i <= maximum_number_of_surfaces - 1; i++) { if (data->enable[i]) { - if ((dceip->graphics_lb_nodownscaling_multi_line_prefetching == 1)) { + if (dceip->graphics_lb_nodownscaling_multi_line_prefetching == 1) { data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(8, 10), data->total_dmifmc_urgent_latency)); } else { @@ -1396,7 +1396,7 @@ static void calculate_bandwidth( } /*determine the number of displays with margin to switch in the v_active region*/ for (k = 0; k <= maximum_number_of_surfaces - 1; k++) { - if ((data->enable[k] == 1 && data->display_pstate_change_enable[k] == 1)) { + if (data->enable[k] == 1 && data->display_pstate_change_enable[k] == 1) { number_of_displays_enabled_with_margin = number_of_displays_enabled_with_margin + 1; } } @@ -1442,7 +1442,7 @@ static void calculate_bandwidth( data->nbp_state_change_enable = bw_def_no; } /*dram clock change is possible only in vblank if all displays are aligned and have no margin*/ - if ((number_of_aligned_displays_with_no_margin == number_of_displays_enabled)) { + if (number_of_aligned_displays_with_no_margin == number_of_displays_enabled) { nbp_state_change_enable_blank = bw_def_yes; } else { @@ -1470,7 +1470,7 @@ static void calculate_bandwidth( } } /*compute minimum time to read one chunk from the dmif buffer*/ - if ((number_of_displays_enabled > 2)) { + if (number_of_displays_enabled > 2) { data->chunk_request_delay = 0; } else { @@ -1804,7 +1804,7 @@ static void calculate_bandwidth( data->stutter_exit_watermark[i] = bw_add(bw_sub(vbios->stutter_self_refresh_exit_latency, data->total_dmifmc_urgent_latency), data->urgent_watermark[i]); data->stutter_entry_watermark[i] = bw_add(bw_sub(bw_add(vbios->stutter_self_refresh_exit_latency, vbios->stutter_self_refresh_entry_latency), data->total_dmifmc_urgent_latency), data->urgent_watermark[i]); /*unconditionally remove black out time from the nb p_state watermark*/ - if ((data->display_pstate_change_enable[i] == 1)) { + if (data->display_pstate_change_enable[i] == 1) { data->nbp_state_change_watermark[i] = bw_add(bw_add(vbios->nbp_state_change_latency, data->dmif_burst_time[data->y_clk_level][data->sclk_level]), bw_max2(data->line_source_pixels_transfer_time, data->dram_speed_change_line_source_transfer_time[i][data->y_clk_level][data->sclk_level])); } else { @@ -1816,7 +1816,7 @@ static void calculate_bandwidth( data->urgent_watermark[i] = bw_add(bw_add(bw_add(bw_add(bw_add(vbios->mcifwrmc_urgent_latency, data->mcifwr_burst_time[data->y_clk_level][data->sclk_level]), bw_max2(data->line_source_pixels_transfer_time, data->line_source_transfer_time[i][data->y_clk_level][data->sclk_level])), vbios->blackout_duration), data->chunk_request_time), data->cursor_request_time); data->stutter_exit_watermark[i] = bw_int_to_fixed(0); data->stutter_entry_watermark[i] = bw_int_to_fixed(0); - if ((data->display_pstate_change_enable[i] == 1)) { + if (data->display_pstate_change_enable[i] == 1) { data->nbp_state_change_watermark[i] = bw_add(bw_add(vbios->nbp_state_change_latency, data->mcifwr_burst_time[data->y_clk_level][data->sclk_level]), bw_max2(data->line_source_pixels_transfer_time, data->dram_speed_change_line_source_transfer_time[i][data->y_clk_level][data->sclk_level])); } else { -- 2.16.0.rc1.238.g530d649a79-goog