Thread (32 messages) 32 messages, 2 authors, 2016-01-28
STALE3811d

[patch added to 3.12-stable] drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n

From: Jiri Slaby <hidden>
Date: 2016-01-28 10:52:29
Subsystem: drm drivers, radeon and amdgpu drm drivers, the rest · Maintainers: David Airlie, Simona Vetter, Alex Deucher, Christian König, Linus Torvalds

From: Fabio Estevam <redacted>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 71473dbd66d4a61be4cd531ef96b4877f6ee3941 upstream.

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 <redacted>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Slaby <redacted>
---
 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 85f36e702595..89bdc12adebb 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)
-- 
2.7.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help