On Wednesday 16 August 2017 06:04 PM, Corentin Labbe wrote:
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.

Reviewed-by: Madhavan Srinivasan <ma...@linux.vnet.ibm.com>
Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com>
---
  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 @@ 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) {

Reply via email to