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 <clabbe.montjoie@gmail.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
[mpe: Flesh out change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
LABBE Corentin 2017-08-16 14:34:44 +02:00 committed by Michael Ellerman
parent 1f84c2624a
commit 6538ac3084
1 changed files with 1 additions and 1 deletions

View File

@ -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) {