[PATCH 1/2] drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n
Alex Deucher
alexdeucher at gmail.com
Thu Nov 14 07:39:01 PST 2013
On Sat, Nov 9, 2013 at 12:59 PM, Fabio Estevam <festevam at gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
>
> 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 <fabio.estevam at freescale.com>
Added to my queue. For 2/2, I changed it a bit to not mix code and
declarations.
Alex
> ---
> 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)
> --
> 1.8.1.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list