From patchwork Mon Jan 19 13:10:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 5662001 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE10C9F358 for ; Tue, 20 Jan 2015 02:06:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 125E420353 for ; Tue, 20 Jan 2015 02:06:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1150B203A9 for ; Tue, 20 Jan 2015 02:06:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7E2B6E197; Mon, 19 Jan 2015 18:05:57 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1084 seconds by postgrey-1.34 at gabe; Mon, 19 Jan 2015 05:37:03 PST Received: from www.osadl.org (www.osadl.org [62.245.132.105]) by gabe.freedesktop.org (Postfix) with ESMTP id 946286E058 for ; Mon, 19 Jan 2015 05:37:03 -0800 (PST) Received: from debian.hofr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t0JDIeMW018813; Mon, 19 Jan 2015 14:18:41 +0100 From: Nicholas Mc Guire To: Alex Deucher Subject: [PATCH] drm/radeon: remove unreachable code Date: Mon, 19 Jan 2015 14:10:40 +0100 Message-Id: <1421673040-12305-1-git-send-email-der.herr@hofr.at> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Mailman-Approved-At: Mon, 19 Jan 2015 18:05:56 -0800 Cc: Nicholas Mc Guire , Christian Koenig , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nicholas Mc Guire --- As the if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMUM_ENGINE_CLOCK) is never satisfied - the entire else branch is never going to be executed and could be removed - provided this is not simply a bug and needs to be fixed... Patch is against 3.19.0-rc5 -next-20150119 Patch was only compile tested with x86_64_defconfig + CONFIG_DRM=m, CONFIG_DRM_RADEON=m drivers/gpu/drm/radeon/ci_dpm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index f373a81..28db529 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -3805,13 +3805,8 @@ static void ci_find_dpm_states_clocks_in_dpm_table(struct radeon_device *rdev, break; } - if (i >= sclk_table->count) { + if (i >= sclk_table->count) pi->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK; - } else { - /* XXX check display min clock requirements */ - if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMUM_ENGINE_CLOCK) - pi->need_update_smu7_dpm_table |= DPMTABLE_UPDATE_SCLK; - } for (i = 0; i < mclk_table->count; i++) { if (mclk == mclk_table->dpm_levels[i].value)