From 6538ac30841638b2fd345725a9fd155c6fe1768a Mon Sep 17 00:00:00 2001 From: LABBE Corentin Date: Wed, 16 Aug 2017 14:34:44 +0200 Subject: [PATCH] powerpc/powernv: Fix build error in opal-imc.c when NUMA=n MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When building a random powerpc kernel I hit this build error: arch/powerpc/platforms/powernv/opal-imc.c:130:13: error : assignment discards « const » qualifier from pointer target type [-Werror=discarded-qualifiers] l_cpumask = cpumask_of_node(nid); ^ This happens because when CONFIG_NUMA=n cpumask_of_node() returns a const pointer. This patch simply adds const to l_cpumask to fix this issue. Signed-off-by: Corentin Labbe Reviewed-by: Madhavan Srinivasan [mpe: Flesh out change log] Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/opal-imc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c index b903bf5e6006..21f6531fae20 100644 --- a/arch/powerpc/platforms/powernv/opal-imc.c +++ b/arch/powerpc/platforms/powernv/opal-imc.c @@ -123,7 +123,7 @@ free_pmu: static void disable_nest_pmu_counters(void) { int nid, cpu; - struct cpumask *l_cpumask; + const struct cpumask *l_cpumask; get_online_cpus(); for_each_online_node(nid) { -- 2.20.1