dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: alexander.deucher@amd.com
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] drm: radeon: cypress_dpm: Fix unused variable warning when CONFIG_ACPI=n
Date: Sat,  9 Nov 2013 15:59:03 -0200	[thread overview]
Message-ID: <1384019943-25401-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1384019943-25401-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

With CONFIG_ACPI=n the following build warning is seen:

drivers/gpu/drm/radeon/cypress_dpm.c:302: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 <fabio.estevam@freescale.com>
---
 drivers/gpu/drm/radeon/cypress_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 91bb470..a231c59 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -299,7 +299,6 @@ void cypress_program_response_times(struct radeon_device *rdev)
 static int cypress_pcie_performance_request(struct radeon_device *rdev,
 					    u8 perf_req, bool advertise)
 {
-	struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
 	u32 tmp;
 
 	udelay(10);
@@ -308,6 +307,7 @@ static int cypress_pcie_performance_request(struct radeon_device *rdev,
 		return 0;
 
 #if defined(CONFIG_ACPI)
+	struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
 	if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) ||
 	    (perf_req == PCIE_PERF_REQ_PECI_GEN2)) {
 		eg_pi->pcie_performance_request_registered = true;
-- 
1.8.1.2

  reply	other threads:[~2013-11-09 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 17:59 [PATCH 1/2] drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n Fabio Estevam
2013-11-09 17:59 ` Fabio Estevam [this message]
2013-11-14 15:39 ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384019943-25401-2-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox