From patchwork Sat Nov 9 17:59:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 3164071 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B68369F243 for ; Sat, 9 Nov 2013 17:59:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F154F2038E for ; Sat, 9 Nov 2013 17:59:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B1BF62038C for ; Sat, 9 Nov 2013 17:59:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46113FB68C; Sat, 9 Nov 2013 09:59:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 56592FB68C for ; Sat, 9 Nov 2013 09:59:15 -0800 (PST) Received: by mail-qc0-f177.google.com with SMTP id b10so581947qcw.8 for ; Sat, 09 Nov 2013 09:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=c3x2d90YI15GyMlU0WHMJF8kq+aJJCaPmZbaF/PDpXg=; b=BC4gW1/0e0MYC8qHtckWYhOub58kWmhQiF7EZSBSDRrULdn7SNraPHivjI9sOtW08H p3eOwkAZZypnaW4YJb23URi3YqZASmThGrtwr/zWcVf7MkFSMUyj4thfH2xbaBCgwSa0 HeHBW/JewrAbTfgv9Nl/US6Kb05K+wlzfTZVqwroCkrQD5tsZFazQem3Y2tY+s+Yd1CG uHmS+nqceh8zSPsF+t5nWh7bANQISXVf5q/MU4QPsJ9h3kmtBMuU9jPm5aIyUgoXnym+ qEYL3lyAULLWJ54cAR5CTOxXG5T8lfSZj6opERSd+EYgDlQcrcBXcFju5TSLiNjWOrbA Oj9g== X-Received: by 10.224.92.81 with SMTP id q17mr34332122qam.51.1384019954141; Sat, 09 Nov 2013 09:59:14 -0800 (PST) Received: from localhost.localdomain ([186.207.93.139]) by mx.google.com with ESMTPSA id e10sm24969972yhj.1.2013.11.09.09.59.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Nov 2013 09:59:13 -0800 (PST) From: Fabio Estevam To: alexander.deucher@amd.com Subject: [PATCH 1/2] drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n Date: Sat, 9 Nov 2013 15:59:02 -0200 Message-Id: <1384019943-25401-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: Fabio Estevam , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam With CONFIG_ACPI=n the following build warning is seen: drivers/gpu/drm/radeon/ni_dpm.c:3448:31: warning: unused variable 'eg_pi' [-Wunused-variable] Move the definition of eg_pi inside the CONFIG_ACPI 'if' block. Signed-off-by: Fabio Estevam --- drivers/gpu/drm/radeon/ni_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index f263390..cdc0030 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -3445,9 +3445,9 @@ static int ni_enable_smc_cac(struct radeon_device *rdev, static int ni_pcie_performance_request(struct radeon_device *rdev, u8 perf_req, bool advertise) { +#if defined(CONFIG_ACPI) struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev); -#if defined(CONFIG_ACPI) if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) || (perf_req == PCIE_PERF_REQ_PECI_GEN2)) { if (eg_pi->pcie_performance_request_registered == false)