Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751738AbdHPMg7 (ORCPT ); Wed, 16 Aug 2017 08:36:59 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35096 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbdHPMg5 (ORCPT ); Wed, 16 Aug 2017 08:36:57 -0400 From: Corentin Labbe To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, anju@linux.vnet.ibm.com, maddy@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH] powerpc: powernv: Fix build error on const discarding Date: Wed, 16 Aug 2017 14:34:44 +0200 Message-Id: <20170816123444.5202-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 28 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. Signed-off-by: Corentin Labbe --- 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) { -- 2.13.0