Skip to content

Commit

Permalink
ARM: imx: hide unused variable in #ifdef
Browse files Browse the repository at this point in the history
A bugfix added a new local variable that is only used inside of an #ifdef
section, and unused if CONFIG_PERF_EVENTS is disabled:

arch/arm/mach-imx/mmdc.c:63:25: warning: 'cpuhp_mmdc_state' defined but not used [-Wunused-variable]

This moves the variable down inside that same ifdef.

Fixes: a051f22 ("ARM/imx/mmcd: Fix broken cpu hotplug handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
  • Loading branch information
Arnd Bergmann authored and Shawn Guo committed Jan 23, 2017
1 parent 37530e7 commit 7f1931b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mmdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

#define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu)

static enum cpuhp_state cpuhp_mmdc_state;
static int ddr_type;

struct fsl_mmdc_devtype_data {
Expand All @@ -82,6 +81,7 @@ static const struct of_device_id imx_mmdc_dt_ids[] = {

#ifdef CONFIG_PERF_EVENTS

static enum cpuhp_state cpuhp_mmdc_state;
static DEFINE_IDA(mmdc_ida);

PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
Expand Down

0 comments on commit 7f1931b

Please sign in to comment.