Re: [PATCH] x86/UV: Fix conditional in gru_exit

2014-03-31 Thread Dimitri Sivanich
On Mon, Mar 31, 2014 at 09:25:05AM +0200, Ingo Molnar wrote: > * Dimitri Sivanich wrote: > > > +static int gru_unsupported(void) > > +{ > > + return !is_uv_system() || (is_uvx_hub() && !is_uv2_hub()); > > +} > > So the usual pattern is to introduce simple patterns, without logic > operations

Re: [PATCH] x86/UV: Fix conditional in gru_exit

2014-03-31 Thread Ingo Molnar
* Dimitri Sivanich wrote: > On Fri, Mar 21, 2014 at 08:55:49AM +0100, Ingo Molnar wrote: > > > - if (!is_uv_system()) > > > + if (!is_uv_system() || (is_uvx_hub() && !is_uv2_hub())) > > > return; > > > > Such an amalgation of three system specific conditionals is > > disgusting, plea

Re: [PATCH] x86/UV: Fix conditional in gru_exit

2014-03-21 Thread Dimitri Sivanich
On Fri, Mar 21, 2014 at 08:55:49AM +0100, Ingo Molnar wrote: > > - if (!is_uv_system()) > > + if (!is_uv_system() || (is_uvx_hub() && !is_uv2_hub())) > > return; > > Such an amalgation of three system specific conditionals is > disgusting, please at minimum factor out a helper rou

Re: [PATCH] x86/UV: Fix conditional in gru_exit

2014-03-21 Thread Ingo Molnar
* Dimitri Sivanich wrote: > Fix conditional in gru_exit to match gru_init. > > Signed-off-by: Dimitri Sivanich > --- > drivers/misc/sgi-gru/grufile.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux/drivers/misc/sgi-gru/grufile.c > =

[PATCH] x86/UV: Fix conditional in gru_exit

2014-03-20 Thread Dimitri Sivanich
Fix conditional in gru_exit to match gru_init. Signed-off-by: Dimitri Sivanich --- drivers/misc/sgi-gru/grufile.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux/drivers/misc/sgi-gru/grufile.c === --- linux.or