From patchwork Mon Nov 6 11:44:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10043375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D3A060247 for ; Mon, 6 Nov 2017 11:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08186274D1 for ; Mon, 6 Nov 2017 11:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0B5B29A09; Mon, 6 Nov 2017 11:44:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 04EAD274D1 for ; Mon, 6 Nov 2017 11:44:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 529FD89E59; Mon, 6 Nov 2017 11:44:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 287CB89E4C; Mon, 6 Nov 2017 11:44:39 +0000 (UTC) Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA6BiWJ2002051 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Nov 2017 11:44:32 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vA6BiWxS021618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Nov 2017 11:44:32 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vA6BiVvV021278; Mon, 6 Nov 2017 11:44:31 GMT Received: from mwanda (/129.205.6.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Nov 2017 03:44:31 -0800 Date: Mon, 6 Nov 2017 14:44:22 +0300 From: Dan Carpenter To: Alex Deucher Subject: [PATCH] drm/amd/display: remove some unneeded code Message-ID: <20171106114422.sd5zoah6k6eaww4e@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: Charlene Liu , David Airlie , dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Dmytro Laktyushkin , Vitaly Prosyak , Yongqiang Sun , Tony Cheng , Christian =?iso-8859-1?Q?K=F6nig?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We assign "v_init = asic_blank_start;" a few lines earlier so there is no need to do it again inside the if statements. Also "v_init" is unsigned so it can't be less than zero. Signed-off-by: Dan Carpenter Acked-by: Christian König diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c index 1994865d4351..c7333cdf1802 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c @@ -236,13 +236,10 @@ static void tgn10_program_timing( if (tg->dlg_otg_param.signal == SIGNAL_TYPE_DISPLAY_PORT || tg->dlg_otg_param.signal == SIGNAL_TYPE_DISPLAY_PORT_MST || tg->dlg_otg_param.signal == SIGNAL_TYPE_EDP) { - v_init = asic_blank_start; start_point = 1; if (patched_crtc_timing.flags.INTERLACE == 1) field_num = 1; } - if (v_init < 0) - v_init = 0; v_fp2 = 0; if (tg->dlg_otg_param.vstartup_start > asic_blank_end) v_fp2 = tg->dlg_otg_param.vstartup_start > asic_blank_end;