Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1884530ybi; Sat, 25 May 2019 10:56:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDeA+BaBTIQZDaHKisTms0YRLcs4vUdpgbsNE5+S+JWS8m2FZ8BsFQuolDFHwobiHlY/Zy X-Received: by 2002:a63:c750:: with SMTP id v16mr112521477pgg.409.1558806986989; Sat, 25 May 2019 10:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558806986; cv=none; d=google.com; s=arc-20160816; b=lCEw5+I6LnWx4NXxG6aLgMwrIVdpGStZJ7rSdnkxP+sBRPKnlvAc98UpZEuBpfMIQf 1y3uM9ZFvaMrJUAT6lx7uycH4C5tYYvxZkLsLjdwpmhlGFxtTjh9JicJD4Bk3OmMg+nj zHkhRf8GAxdxtWWhx8silXh3scm5h0JbOlTLqEu3p5oqbvbna0Oj0VrP7w5xtAbH3AYX EElL+UfaZepyE5IR3lptXZoHADpJWWBR5ub9icpFpD8ACSS2ozhHPsHgLu1pHic9j26M bmSQIAM0NhYj87H6fFFaqc9xwrO4oL8DxfZVslSglD4aIM2SOsb2cpo0WY5dNfEE7cM8 ePiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=DEpuhQuBsGwiHo827HWHBFzX5NQZPFzzYlkuA72/SiA=; b=U2NfnWra2UIM9t+ZAcr+c6PoKbzASozW7Oxp/Q0/pk6Nbyo3ZuNWJu3+wJmiZiI01J WcuIp8thLzeJR4VctVX7vM/CleTQL3HvyM3voQVs/VV5ZV7BrBtTu00SnwjnBs4XNtuP Qo60azpTMoEjv5keQjWXqY3SlQ+wVQUPZ7TYHjziwZ2sTCVvlt5SA0aXW/SzE0h2b6Dr BoObBsm/mpq0p5FiapG2ua+QR/CvbYiTefMXM0JeLTtqRB10FxQ4jwe+BrXyQTWsY8+E 9PjMzyjwO/gzLv2w4zHg8is/nZv6ZtfxgjP6wgFkBBO6zm97jl+W0aIxgYmkTFFmCTVa ILqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WjLdOQG9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si5211475pgc.157.2019.05.25.10.56.11; Sat, 25 May 2019 10:56:26 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WjLdOQG9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727228AbfEYRyc (ORCPT + 99 others); Sat, 25 May 2019 13:54:32 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46772 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbfEYRyc (ORCPT ); Sat, 25 May 2019 13:54:32 -0400 Received: by mail-pf1-f194.google.com with SMTP id y11so2337769pfm.13 for ; Sat, 25 May 2019 10:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=DEpuhQuBsGwiHo827HWHBFzX5NQZPFzzYlkuA72/SiA=; b=WjLdOQG9mrCp0ELu/bt3O7UbVIAvTh0Vx7MQoek6qs57GO34xUppozMYwVWZmRFIwT G5iGj3R3oNgfcluvs8nU/wSndGgci99HUZxy8+HkvbtYyDpHGCjuEebjCP8qncM+xKgF xDW+dw2o1phUBlNvLqik6tZMYK3B0ORF6g/NFvFJXgMaUFZLv28GTtjhPmeLLgE5LMPd iDFiFUGCrEY4iSjXKSJ4lDquw57Dp30z62mB0tFiefEICYvHXaw6SiOaMuBwmtwrBO0U 19B1NlFFf50I5VPVxRePkMRGabg3CBp0upUgpaqdsP6qxFPRjA9RmRLaWx+pW1mBFOY7 F6GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=DEpuhQuBsGwiHo827HWHBFzX5NQZPFzzYlkuA72/SiA=; b=rah3e8td220NleXCHEQcbmW/XP5M/Bm+hFpnZPqGzXIYL8c7EZPfVM1Iki4t1FZeBa VM3rCqvx80FwGuHql3AlGarVybeMTIVe3rpNE4MDOVl9exiPmggDrDAsggWT0Ep4qKQd Gh+elpZjCjiwvrJvZZkZe3imQV2qMpyjP1Bsfxi542fRuHY87MkDQSLWKb8TbtLMvvCX RoIW6b5m29p5E+63j/lkJ6jCzbHqOZ9tp0D1kADyhwd+Lfgu33BnYeayb1wPvVS+FKHx tPyGKAcAe5HGxIZkfhQDJBwOtiFokIaXyx2NSGcNnEfWVaOkGz2BoQ5KGO0EF5xeeSyi Xf+w== X-Gm-Message-State: APjAAAVnQ8oW2Hu/SNNcAA9E89dG+/37sXDdsu7WLA1x1UKDxqDT1P3/ JN/RZkwymHtyPmo+9+u8udE= X-Received: by 2002:a63:2f47:: with SMTP id v68mr28837402pgv.251.1558806871591; Sat, 25 May 2019 10:54:31 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id p90sm16977127pfa.18.2019.05.25.10.54.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 10:54:29 -0700 (PDT) Date: Sat, 25 May 2019 23:24:23 +0530 From: Hariprasad Kelam To: Harry Wentland , Leo Li , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Charlene Liu , Nicholas Kazlauskas , Hariprasad Kelam , Ken Chalmers , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: fix possible condition with no effect (if == else) Message-ID: <20190525175423.GA27834@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below warning reported by coccicheck ./drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:1364:3-5: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam --- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 +------- 1 file changed, 1 insertion(+), 7 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 f3aa7b5..0706ced 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c @@ -1361,13 +1361,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) { - data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(5, 10), data->total_dmifmc_urgent_latency)); - } - else { - /*maximum_latency_hiding(i) = minimum_latency_hiding(i) + 1 / vsr(i) * h_total(i) / pixel_rate(i) + 0.5 * total_dmifmc_urgent_latency*/ - data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(5, 10), data->total_dmifmc_urgent_latency)); - } + data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(5, 10), data->total_dmifmc_urgent_latency)); data->maximum_latency_hiding_with_cursor[i] = bw_min2(data->maximum_latency_hiding[i], data->cursor_latency_hiding[i]); } } -- 2.7.4