Re: [PATCH] powerpc: powernv: Fix build error on const discarding

From: Michael Ellerman
Date: Thu Aug 17 2017 - 08:52:23 EST


Corentin Labbe <clabbe.montjoie@xxxxxxxxx> writes:

> When building a random powerpc kernel I hit this build error:
> CC arch/powerpc/platforms/powernv/opal-imc.o
> arch/powerpc/platforms/powernv/opal-imc.c: In function ÂÂdisable_nest_pmu_countersÂÂ:
> 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 patch simply add const to l_cpumask to fix this issue.

Thanks. I'm not sure why we haven't seen that.

Do you mind attaching your .config ?

cheers