From: LABBE Corentin Date: Wed, 16 Aug 2017 12:34:44 +0000 (+0200) Subject: powerpc/powernv: Fix build error in opal-imc.c when NUMA=n X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6538ac30841638b2fd345725a9fd155c6fe1768a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git powerpc/powernv: Fix build error in opal-imc.c when NUMA=n 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 --- 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) {