Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6538ac30 authored by LABBE Corentin's avatar LABBE Corentin Committed by Michael Ellerman
Browse files

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: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
[mpe: Flesh out change log]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1f84c262
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static int imc_pmu_create(struct device_node *parent, int pmu_index, int domain)
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) {