提交 7f1931b3 编写于 作者: A Arnd Bergmann 提交者: Shawn Guo

ARM: imx: hide unused variable in #ifdef

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: a051f220 ("ARM/imx/mmcd: Fix broken cpu hotplug handling")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NFrank Li <Frank.Li@nxp.com>
Signed-off-by: NShawn Guo <shawnguo@kernel.org>
上级 37530e74
......@@ -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 {
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册