Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 07:36:29AM -0700, Paul E. McKenney wrote: > On Thu, Jun 22, 2017 at 12:15:50AM +0200, Arnd Bergmann wrote: > > On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney > > wrote: > > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 07:36:29AM -0700, Paul E. McKenney wrote: > On Thu, Jun 22, 2017 at 12:15:50AM +0200, Arnd Bergmann wrote: > > On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney > > wrote: > > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > > >> Without CONFIG_SMP, we

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 09:26:44AM +0200, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > > > Without CONFIG_SMP, we get a harmless warning about > > > an unused variable: > > > > > >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 09:26:44AM +0200, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > > > Without CONFIG_SMP, we get a harmless warning about > > > an unused variable: > > > > > > kernel/cpu.c: In function

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 12:15:50AM +0200, Arnd Bergmann wrote: > On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney > wrote: > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > >> Without CONFIG_SMP, we get a harmless warning about > >> an unused

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Paul E. McKenney
On Thu, Jun 22, 2017 at 12:15:50AM +0200, Arnd Bergmann wrote: > On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney > wrote: > > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > >> Without CONFIG_SMP, we get a harmless warning about > >> an unused variable: > >> > >> kernel/cpu.c:

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 11:02 AM, Ingo Molnar wrote: > > * Arnd Bergmann wrote: > >> On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: >> > >> > So, to continue this side thought about uninitialized_var(), it is >> > dangerous >> > because

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 11:02 AM, Ingo Molnar wrote: > > * Arnd Bergmann wrote: > >> On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: >> > >> > So, to continue this side thought about uninitialized_var(), it is >> > dangerous >> > because the following buggy pattern does not generate a

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Arnd Bergmann wrote: > On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: > > > > So, to continue this side thought about uninitialized_var(), it is dangerous > > because the following buggy pattern does not generate a compiler warning: > > > > long

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Arnd Bergmann wrote: > On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: > > > > So, to continue this side thought about uninitialized_var(), it is dangerous > > because the following buggy pattern does not generate a compiler warning: > > > > long uninitialized_var(error); > > > >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: > > So, to continue this side thought about uninitialized_var(), it is dangerous > because the following buggy pattern does not generate a compiler warning: > > long uninitialized_var(error); > > ... > >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 9:59 AM, Ingo Molnar wrote: > > So, to continue this side thought about uninitialized_var(), it is dangerous > because the following buggy pattern does not generate a compiler warning: > > long uninitialized_var(error); > > ... > > if (error) >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
So, to continue this side thought about uninitialized_var(), it is dangerous because the following buggy pattern does not generate a compiler warning: long uninitialized_var(error); ... if (error) return error; ... and still there are over 290 uses of

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
So, to continue this side thought about uninitialized_var(), it is dangerous because the following buggy pattern does not generate a compiler warning: long uninitialized_var(error); ... if (error) return error; ... and still there are over 290 uses of

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Arnd Bergmann wrote: > > > > So I think we should consider it a syntactic construct to avoid. > > > > Unused variables are relatively harmless compared to used-uninitialized > > variables that are always bugs (though they are

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Arnd Bergmann wrote: > > > > So I think we should consider it a syntactic construct to avoid. > > > > Unused variables are relatively harmless compared to used-uninitialized > > variables that are always bugs (though they are provably impossible to > > detect

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Arnd Bergmann wrote: > > So I think we should consider it a syntactic construct to avoid. > > Unused variables are relatively harmless compared to used-uninitialized > variables that are always bugs (though they are provably impossible to > detect correctly in some cases). So

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Arnd Bergmann wrote: > > So I think we should consider it a syntactic construct to avoid. > > Unused variables are relatively harmless compared to used-uninitialized > variables that are always bugs (though they are provably impossible to > detect correctly in some cases). So the thing I

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 9:26 AM, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > >> On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: >> > Without CONFIG_SMP, we get a harmless warning about >> > an unused variable: >> > >> >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 9:26 AM, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > >> On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: >> > Without CONFIG_SMP, we get a harmless warning about >> > an unused variable: >> > >> > kernel/cpu.c: In function 'boot_cpu_state_init': >> >

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Paul E. McKenney wrote: > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > > Without CONFIG_SMP, we get a harmless warning about > > an unused variable: > > > > kernel/cpu.c: In function 'boot_cpu_state_init': > > kernel/cpu.c:1778:6: error: unused

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-22 Thread Ingo Molnar
* Paul E. McKenney wrote: > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > > Without CONFIG_SMP, we get a harmless warning about > > an unused variable: > > > > kernel/cpu.c: In function 'boot_cpu_state_init': > > kernel/cpu.c:1778:6: error: unused variable 'cpu'

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney wrote: > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: >> Without CONFIG_SMP, we get a harmless warning about >> an unused variable: >> >> kernel/cpu.c: In function 'boot_cpu_state_init': >>

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 12:10 AM, Paul E. McKenney wrote: > On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: >> Without CONFIG_SMP, we get a harmless warning about >> an unused variable: >> >> kernel/cpu.c: In function 'boot_cpu_state_init': >> kernel/cpu.c:1778:6: error: unused

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Paul E. McKenney
On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > Without CONFIG_SMP, we get a harmless warning about > an unused variable: > > kernel/cpu.c: In function 'boot_cpu_state_init': > kernel/cpu.c:1778:6: error: unused variable 'cpu' [-Werror=unused-variable] > > This reworks the

Re: [PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Paul E. McKenney
On Wed, Jun 21, 2017 at 11:57:28PM +0200, Arnd Bergmann wrote: > Without CONFIG_SMP, we get a harmless warning about > an unused variable: > > kernel/cpu.c: In function 'boot_cpu_state_init': > kernel/cpu.c:1778:6: error: unused variable 'cpu' [-Werror=unused-variable] > > This reworks the

[PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Arnd Bergmann
Without CONFIG_SMP, we get a harmless warning about an unused variable: kernel/cpu.c: In function 'boot_cpu_state_init': kernel/cpu.c:1778:6: error: unused variable 'cpu' [-Werror=unused-variable] This reworks the function to have the declaration inside of the #ifdef. Fixes: faeb334286b7 ("rcu:

[PATCH] rcu: remove unused variable in boot_cpu_state_init

2017-06-21 Thread Arnd Bergmann
Without CONFIG_SMP, we get a harmless warning about an unused variable: kernel/cpu.c: In function 'boot_cpu_state_init': kernel/cpu.c:1778:6: error: unused variable 'cpu' [-Werror=unused-variable] This reworks the function to have the declaration inside of the #ifdef. Fixes: faeb334286b7 ("rcu: