Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1712915 > unrolled thread

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

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-08-16 14:40 +0200
Last post2017-08-25 03:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] powerpc: powernv: Fix build error on const discarding Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-16 14:40 +0200
    Re: [PATCH] powerpc: powernv: Fix build error on const discarding Michael Ellerman <mpe@ellerman.id.au> - 2017-08-17 15:00 +0200
      Re: [PATCH] powerpc: powernv: Fix build error on const discarding Michael Ellerman <mpe@ellerman.id.au> - 2017-08-25 03:30 +0200

#1712915 — [PATCH] powerpc: powernv: Fix build error on const discarding

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-16 14:40 +0200
Subject[PATCH] powerpc: powernv: Fix build error on const discarding
Message-ID<uf5M6-73I-23@gated-at.bofh.it>
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 <clabbe.montjoie@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) {
-- 
2.13.0

[toc] | [next] | [standalone]


#1713987

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-08-17 15:00 +0200
Message-ID<ufsz0-4YZ-23@gated-at.bofh.it>
In reply to#1712915
Corentin Labbe <clabbe.montjoie@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#1719701

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-08-25 03:30 +0200
Message-ID<uibBD-5Ur-7@gated-at.bofh.it>
In reply to#1713987
Corentin Labbe <clabbe.montjoie@gmail.com> writes:

> On Thu, Aug 17, 2017 at 10:52:11PM +1000, Michael Ellerman wrote:
>> Corentin Labbe <clabbe.montjoie@gmail.com> 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
>
> Yes

Thanks.

So the key is:

> CONFIG_PPC_POWERNV=y
...
> # CONFIG_NUMA is not set


Which none of our configs have.

I'll add a test build of that.

Thanks.

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web