All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix build warning
@ 2014-06-13 16:38 ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-13 16:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot,
	Guenter Roeck

If compiled with W=1, the following warning is seen in powerpc builds.

arch/powerpc/kernel/smp.c:750:18: warning:
	type qualifiers ignored on function return type
static const int powerpc_smt_flags(void)
                 ^

This is caused by a function returning 'const int', which doesn't
make sense to gcc. Drop 'const' to fix the problem.

Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/powerpc/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 10ffffe..49d5d4e 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
 
 #ifdef CONFIG_SCHED_SMT
 /* cpumask of CPUs with asymetric SMT dependancy */
-static const int powerpc_smt_flags(void)
+static int powerpc_smt_flags(void)
 {
 	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] powerpc: Fix build warning
@ 2014-06-13 16:38 ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-13 16:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Guenter Roeck,
	Vincent Guittot

If compiled with W=1, the following warning is seen in powerpc builds.

arch/powerpc/kernel/smp.c:750:18: warning:
	type qualifiers ignored on function return type
static const int powerpc_smt_flags(void)
                 ^

This is caused by a function returning 'const int', which doesn't
make sense to gcc. Drop 'const' to fix the problem.

Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/powerpc/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 10ffffe..49d5d4e 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
 
 #ifdef CONFIG_SCHED_SMT
 /* cpumask of CPUs with asymetric SMT dependancy */
-static const int powerpc_smt_flags(void)
+static int powerpc_smt_flags(void)
 {
 	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-13 16:38 ` Guenter Roeck
@ 2014-06-17  1:25   ` David Rientjes
  -1 siblings, 0 replies; 18+ messages in thread
From: David Rientjes @ 2014-06-17  1:25 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-kernel, Vincent Guittot

On Fri, 13 Jun 2014, Guenter Roeck wrote:

> If compiled with W=1, the following warning is seen in powerpc builds.
> 
> arch/powerpc/kernel/smp.c:750:18: warning:
> 	type qualifiers ignored on function return type
> static const int powerpc_smt_flags(void)
>                  ^
> 
> This is caused by a function returning 'const int', which doesn't
> make sense to gcc. Drop 'const' to fix the problem.
> 
> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: David Rientjes <rientjes@google.com>

Although it's strange you report this happening on line 750 in the 
changelog but the patch shows it differently.

> ---
>  arch/powerpc/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 10ffffe..49d5d4e 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
>  
>  #ifdef CONFIG_SCHED_SMT
>  /* cpumask of CPUs with asymetric SMT dependancy */
> -static const int powerpc_smt_flags(void)
> +static int powerpc_smt_flags(void)
>  {
>  	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
>  

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-17  1:25   ` David Rientjes
  0 siblings, 0 replies; 18+ messages in thread
From: David Rientjes @ 2014-06-17  1:25 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Vincent Guittot, Paul Mackerras, linuxppc-dev, linux-kernel

On Fri, 13 Jun 2014, Guenter Roeck wrote:

> If compiled with W=1, the following warning is seen in powerpc builds.
> 
> arch/powerpc/kernel/smp.c:750:18: warning:
> 	type qualifiers ignored on function return type
> static const int powerpc_smt_flags(void)
>                  ^
> 
> This is caused by a function returning 'const int', which doesn't
> make sense to gcc. Drop 'const' to fix the problem.
> 
> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: David Rientjes <rientjes@google.com>

Although it's strange you report this happening on line 750 in the 
changelog but the patch shows it differently.

> ---
>  arch/powerpc/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 10ffffe..49d5d4e 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
>  
>  #ifdef CONFIG_SCHED_SMT
>  /* cpumask of CPUs with asymetric SMT dependancy */
> -static const int powerpc_smt_flags(void)
> +static int powerpc_smt_flags(void)
>  {
>  	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
>  

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-17  1:25   ` David Rientjes
@ 2014-06-17  2:02     ` Guenter Roeck
  -1 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-17  2:02 UTC (permalink / raw)
  To: David Rientjes
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-kernel, Vincent Guittot

On 06/16/2014 06:25 PM, David Rientjes wrote:
> On Fri, 13 Jun 2014, Guenter Roeck wrote:
>
>> If compiled with W=1, the following warning is seen in powerpc builds.
>>
>> arch/powerpc/kernel/smp.c:750:18: warning:
>> 	type qualifiers ignored on function return type
>> static const int powerpc_smt_flags(void)
>>                   ^
>>
>> This is caused by a function returning 'const int', which doesn't
>> make sense to gcc. Drop 'const' to fix the problem.
>>
>> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Although it's strange you report this happening on line 750 in the
> changelog but the patch shows it differently.
>

In the latest kernel (v3.16-rc1) the function is at line 750.
It appears that I ran the build test on a later version than
the one I used to write the patch. Hope that is not a problem.

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-17  2:02     ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-17  2:02 UTC (permalink / raw)
  To: David Rientjes
  Cc: Vincent Guittot, Paul Mackerras, linuxppc-dev, linux-kernel

On 06/16/2014 06:25 PM, David Rientjes wrote:
> On Fri, 13 Jun 2014, Guenter Roeck wrote:
>
>> If compiled with W=1, the following warning is seen in powerpc builds.
>>
>> arch/powerpc/kernel/smp.c:750:18: warning:
>> 	type qualifiers ignored on function return type
>> static const int powerpc_smt_flags(void)
>>                   ^
>>
>> This is caused by a function returning 'const int', which doesn't
>> make sense to gcc. Drop 'const' to fix the problem.
>>
>> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Although it's strange you report this happening on line 750 in the
> changelog but the patch shows it differently.
>

In the latest kernel (v3.16-rc1) the function is at line 750.
It appears that I ran the build test on a later version than
the one I used to write the patch. Hope that is not a problem.

Guenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-13 16:38 ` Guenter Roeck
@ 2014-06-24  4:35   ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  4:35 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot

On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
> If compiled with W=1, the following warning is seen in powerpc builds.
> 
> arch/powerpc/kernel/smp.c:750:18: warning:
> 	type qualifiers ignored on function return type
> static const int powerpc_smt_flags(void)
>                  ^
> 
> This is caused by a function returning 'const int', which doesn't
> make sense to gcc. Drop 'const' to fix the problem.

This breaks the 64-bit build:

arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]

It appears that the generic definition in sched.h has this function
defined as const int, so that needs to be fixed too along with all
instances in all archs.

Cheers,
Ben.

> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  arch/powerpc/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 10ffffe..49d5d4e 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
>  
>  #ifdef CONFIG_SCHED_SMT
>  /* cpumask of CPUs with asymetric SMT dependancy */
> -static const int powerpc_smt_flags(void)
> +static int powerpc_smt_flags(void)
>  {
>  	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
>  



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-24  4:35   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  4:35 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Vincent Guittot

On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
> If compiled with W=1, the following warning is seen in powerpc builds.
> 
> arch/powerpc/kernel/smp.c:750:18: warning:
> 	type qualifiers ignored on function return type
> static const int powerpc_smt_flags(void)
>                  ^
> 
> This is caused by a function returning 'const int', which doesn't
> make sense to gcc. Drop 'const' to fix the problem.

This breaks the 64-bit build:

arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]

It appears that the generic definition in sched.h has this function
defined as const int, so that needs to be fixed too along with all
instances in all archs.

Cheers,
Ben.

> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  arch/powerpc/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 10ffffe..49d5d4e 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
>  
>  #ifdef CONFIG_SCHED_SMT
>  /* cpumask of CPUs with asymetric SMT dependancy */
> -static const int powerpc_smt_flags(void)
> +static int powerpc_smt_flags(void)
>  {
>  	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
>  

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-24  4:35   ` Benjamin Herrenschmidt
@ 2014-06-24  5:05     ` Guenter Roeck
  -1 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-24  5:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot

On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
>> If compiled with W=1, the following warning is seen in powerpc builds.
>>
>> arch/powerpc/kernel/smp.c:750:18: warning:
>> 	type qualifiers ignored on function return type
>> static const int powerpc_smt_flags(void)
>>                   ^
>>
>> This is caused by a function returning 'const int', which doesn't
>> make sense to gcc. Drop 'const' to fix the problem.
>
> This breaks the 64-bit build:
>
> arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
> arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
>
> It appears that the generic definition in sched.h has this function
> defined as const int, so that needs to be fixed too along with all
> instances in all archs.
>

https://lkml.org/lkml/2014/6/12/743

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-24  5:05     ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-24  5:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Vincent Guittot

On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
>> If compiled with W=1, the following warning is seen in powerpc builds.
>>
>> arch/powerpc/kernel/smp.c:750:18: warning:
>> 	type qualifiers ignored on function return type
>> static const int powerpc_smt_flags(void)
>>                   ^
>>
>> This is caused by a function returning 'const int', which doesn't
>> make sense to gcc. Drop 'const' to fix the problem.
>
> This breaks the 64-bit build:
>
> arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
> arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
>
> It appears that the generic definition in sched.h has this function
> defined as const int, so that needs to be fixed too along with all
> instances in all archs.
>

https://lkml.org/lkml/2014/6/12/743

Guenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-24  5:05     ` Guenter Roeck
@ 2014-06-24  5:34       ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  5:34 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot

On Mon, 2014-06-23 at 22:05 -0700, Guenter Roeck wrote:
> On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
> > On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
> >> If compiled with W=1, the following warning is seen in powerpc builds.
> >>
> >> arch/powerpc/kernel/smp.c:750:18: warning:
> >> 	type qualifiers ignored on function return type
> >> static const int powerpc_smt_flags(void)
> >>                   ^
> >>
> >> This is caused by a function returning 'const int', which doesn't
> >> make sense to gcc. Drop 'const' to fix the problem.
> >
> > This breaks the 64-bit build:
> >
> > arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
> > arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
> >
> > It appears that the generic definition in sched.h has this function
> > defined as const int, so that needs to be fixed too along with all
> > instances in all archs.
> >
> 
> https://lkml.org/lkml/2014/6/12/743

Won't the patch above break powerpc then ? IE. The functions signature
won't match anymore ... /me thinks you probably need to fix them all
at once.

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-24  5:34       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  5:34 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Vincent Guittot

On Mon, 2014-06-23 at 22:05 -0700, Guenter Roeck wrote:
> On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
> > On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
> >> If compiled with W=1, the following warning is seen in powerpc builds.
> >>
> >> arch/powerpc/kernel/smp.c:750:18: warning:
> >> 	type qualifiers ignored on function return type
> >> static const int powerpc_smt_flags(void)
> >>                   ^
> >>
> >> This is caused by a function returning 'const int', which doesn't
> >> make sense to gcc. Drop 'const' to fix the problem.
> >
> > This breaks the 64-bit build:
> >
> > arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
> > arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
> >
> > It appears that the generic definition in sched.h has this function
> > defined as const int, so that needs to be fixed too along with all
> > instances in all archs.
> >
> 
> https://lkml.org/lkml/2014/6/12/743

Won't the patch above break powerpc then ? IE. The functions signature
won't match anymore ... /me thinks you probably need to fix them all
at once.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-24  5:34       ` Benjamin Herrenschmidt
@ 2014-06-24  6:01         ` Guenter Roeck
  -1 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-24  6:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot

On 06/23/2014 10:34 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2014-06-23 at 22:05 -0700, Guenter Roeck wrote:
>> On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
>>> On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
>>>> If compiled with W=1, the following warning is seen in powerpc builds.
>>>>
>>>> arch/powerpc/kernel/smp.c:750:18: warning:
>>>> 	type qualifiers ignored on function return type
>>>> static const int powerpc_smt_flags(void)
>>>>                    ^
>>>>
>>>> This is caused by a function returning 'const int', which doesn't
>>>> make sense to gcc. Drop 'const' to fix the problem.
>>>
>>> This breaks the 64-bit build:
>>>
>>> arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
>>> arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
>>>
>>> It appears that the generic definition in sched.h has this function
>>> defined as const int, so that needs to be fixed too along with all
>>> instances in all archs.
>>>
>>
>> https://lkml.org/lkml/2014/6/12/743
>
> Won't the patch above break powerpc then ? IE. The functions signature
> won't match anymore ... /me thinks you probably need to fix them all
> at once.
>

I thought that only happens if a const is dropped, but maybe not.

Sigh. Much easier to break something than to fix it. That would mean to get approval
from at least three maintainers, and all that to get rid of a warning. I don't
really have time for that. Let's just forget about it and live with the warning.

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-24  6:01         ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-06-24  6:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Vincent Guittot

On 06/23/2014 10:34 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2014-06-23 at 22:05 -0700, Guenter Roeck wrote:
>> On 06/23/2014 09:35 PM, Benjamin Herrenschmidt wrote:
>>> On Fri, 2014-06-13 at 09:38 -0700, Guenter Roeck wrote:
>>>> If compiled with W=1, the following warning is seen in powerpc builds.
>>>>
>>>> arch/powerpc/kernel/smp.c:750:18: warning:
>>>> 	type qualifiers ignored on function return type
>>>> static const int powerpc_smt_flags(void)
>>>>                    ^
>>>>
>>>> This is caused by a function returning 'const int', which doesn't
>>>> make sense to gcc. Drop 'const' to fix the problem.
>>>
>>> This breaks the 64-bit build:
>>>
>>> arch/powerpc/kernel/smp.c:764:2: error: initialization from incompatible pointer type [-Werror]
>>> arch/powerpc/kernel/smp.c:764:2: error: (near initialization for 'powerpc_topology[0].sd_flags') [-Werror]
>>>
>>> It appears that the generic definition in sched.h has this function
>>> defined as const int, so that needs to be fixed too along with all
>>> instances in all archs.
>>>
>>
>> https://lkml.org/lkml/2014/6/12/743
>
> Won't the patch above break powerpc then ? IE. The functions signature
> won't match anymore ... /me thinks you probably need to fix them all
> at once.
>

I thought that only happens if a const is dropped, but maybe not.

Sigh. Much easier to break something than to fix it. That would mean to get approval
from at least three maintainers, and all that to get rid of a warning. I don't
really have time for that. Let's just forget about it and live with the warning.

Guenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-24  6:01         ` Guenter Roeck
@ 2014-06-24  6:38           ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  6:38 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Vincent Guittot

On Mon, 2014-06-23 at 23:01 -0700, Guenter Roeck wrote:
> I thought that only happens if a const is dropped, but maybe not.
> 
> Sigh. Much easier to break something than to fix it. That would mean
> to get approval
> from at least three maintainers, and all that to get rid of a warning.
> I don't
> really have time for that. Let's just forget about it and live with
> the warning.

Well you have my tentative approval :) And trivial ones like that don't
really need the respective maintainers to respond really, I forget
regularly and they still go upstream.

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-24  6:38           ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-24  6:38 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Vincent Guittot

On Mon, 2014-06-23 at 23:01 -0700, Guenter Roeck wrote:
> I thought that only happens if a const is dropped, but maybe not.
> 
> Sigh. Much easier to break something than to fix it. That would mean
> to get approval
> from at least three maintainers, and all that to get rid of a warning.
> I don't
> really have time for that. Let's just forget about it and live with
> the warning.

Well you have my tentative approval :) And trivial ones like that don't
really need the respective maintainers to respond really, I forget
regularly and they still go upstream.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
  2014-06-24  6:01         ` Guenter Roeck
@ 2014-06-25  7:53           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2014-06-25  7:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-kernel, Vincent Guittot

On Tue, Jun 24, 2014 at 8:01 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> Sigh. Much easier to break something than to fix it. That would mean to get
> approval
> from at least three maintainers, and all that to get rid of a warning. I
> don't
> really have time for that. Let's just forget about it and live with the
> warning.

So you send it to akpm. Or perhaps even trivial.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Fix build warning
@ 2014-06-25  7:53           ` Geert Uytterhoeven
  0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2014-06-25  7:53 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Vincent Guittot, Paul Mackerras, linuxppc-dev, linux-kernel

On Tue, Jun 24, 2014 at 8:01 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> Sigh. Much easier to break something than to fix it. That would mean to get
> approval
> from at least three maintainers, and all that to get rid of a warning. I
> don't
> really have time for that. Let's just forget about it and live with the
> warning.

So you send it to akpm. Or perhaps even trivial.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-06-25  7:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13 16:38 [PATCH] powerpc: Fix build warning Guenter Roeck
2014-06-13 16:38 ` Guenter Roeck
2014-06-17  1:25 ` David Rientjes
2014-06-17  1:25   ` David Rientjes
2014-06-17  2:02   ` Guenter Roeck
2014-06-17  2:02     ` Guenter Roeck
2014-06-24  4:35 ` Benjamin Herrenschmidt
2014-06-24  4:35   ` Benjamin Herrenschmidt
2014-06-24  5:05   ` Guenter Roeck
2014-06-24  5:05     ` Guenter Roeck
2014-06-24  5:34     ` Benjamin Herrenschmidt
2014-06-24  5:34       ` Benjamin Herrenschmidt
2014-06-24  6:01       ` Guenter Roeck
2014-06-24  6:01         ` Guenter Roeck
2014-06-24  6:38         ` Benjamin Herrenschmidt
2014-06-24  6:38           ` Benjamin Herrenschmidt
2014-06-25  7:53         ` Geert Uytterhoeven
2014-06-25  7:53           ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.