mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: typo: remove space in #ifdef
@ 2018-02-13  8:59 Vincent Guittot
  2018-02-13  9:05 ` Peter Zijlstra
  2018-02-13  9:37 ` [tip:sched/core] sched/fair: Remove stray " tip-bot for Vincent Guittot
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Guittot @ 2018-02-13  8:59 UTC (permalink / raw)
  To: peterz, mingo, linux-kernel; +Cc: Vincent Guittot

Remove a useless space in # ifdef and align it with others

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 kernel/sched/fair.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1070803..cad1932 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2823,7 +2823,7 @@ void reweight_task(struct task_struct *p, int prio)
 }
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
-# ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
 /*
  * All this does is approximate the hierarchical proportion which includes that
  * global sum we all love to hate.
@@ -2974,7 +2974,7 @@ static long calc_group_runnable(struct cfs_rq *cfs_rq, long shares)
 
 	return clamp_t(long, runnable, MIN_SHARES, shares);
 }
-# endif /* CONFIG_SMP */
+#endif /* CONFIG_SMP */
 
 static inline int throttled_hierarchy(struct cfs_rq *cfs_rq);
 
-- 
2.7.4

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

* Re: [PATCH] sched: typo: remove space in #ifdef
  2018-02-13  8:59 [PATCH] sched: typo: remove space in #ifdef Vincent Guittot
@ 2018-02-13  9:05 ` Peter Zijlstra
  2018-02-13  9:31   ` Ingo Molnar
  2018-02-13  9:37 ` [tip:sched/core] sched/fair: Remove stray " tip-bot for Vincent Guittot
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2018-02-13  9:05 UTC (permalink / raw)
  To: Vincent Guittot; +Cc: mingo, linux-kernel

On Tue, Feb 13, 2018 at 09:59:42AM +0100, Vincent Guittot wrote:
> Remove a useless space in # ifdef and align it with others
> 
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>  kernel/sched/fair.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 1070803..cad1932 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2823,7 +2823,7 @@ void reweight_task(struct task_struct *p, int prio)
>  }
>  
>  #ifdef CONFIG_FAIR_GROUP_SCHED
> -# ifdef CONFIG_SMP
> +#ifdef CONFIG_SMP

Heh, so this is one where Ingo and me disagree ;-) He likes that
indented preprocessor nonsense, whereas I just find it really
bothersome.

I try and hide these in patches that touch the surrounding code.

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

* Re: [PATCH] sched: typo: remove space in #ifdef
  2018-02-13  9:05 ` Peter Zijlstra
@ 2018-02-13  9:31   ` Ingo Molnar
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2018-02-13  9:31 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Vincent Guittot, linux-kernel


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Feb 13, 2018 at 09:59:42AM +0100, Vincent Guittot wrote:
> > Remove a useless space in # ifdef and align it with others
> > 
> > Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> > ---
> >  kernel/sched/fair.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 1070803..cad1932 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -2823,7 +2823,7 @@ void reweight_task(struct task_struct *p, int prio)
> >  }
> >  
> >  #ifdef CONFIG_FAIR_GROUP_SCHED
> > -# ifdef CONFIG_SMP
> > +#ifdef CONFIG_SMP
> 
> Heh, so this is one where Ingo and me disagree ;-)

In this particular case I agree with you.

> He likes that indented preprocessor nonsense, whereas I just find it really 
> bothersome.

Here it's bothersome, because the #ifdef block is long.

It's actually a big improvement in other places:

#ifdef CONFIG_EFI_STUB
# ifdef CONFIG_EFI_MIXED
#  define XLF23 (XLF_EFI_HANDOVER_32|XLF_EFI_HANDOVER_64)
# else
#  ifdef CONFIG_X86_64
#   define XLF23 XLF_EFI_HANDOVER_64            /* 64-bit EFI handover ok */
#  else
#   define XLF23 XLF_EFI_HANDOVER_32            /* 32-bit EFI handover ok */
#  endif
# endif
#else
# define XLF23 0
#endif

Which is a _LOT_ more structured and easier to read than:

#ifdef CONFIG_EFI_STUB
#ifdef CONFIG_EFI_MIXED
#define XLF23 (XLF_EFI_HANDOVER_32|XLF_EFI_HANDOVER_64)
#else
#ifdef CONFIG_X86_64
#define XLF23 XLF_EFI_HANDOVER_64            /* 64-bit EFI handover ok */
#else
#define XLF23 XLF_EFI_HANDOVER_32            /* 32-bit EFI handover ok */
#endif
#endif
#else
#define XLF23 0
#endif

Thanks,

	Ingo

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

* [tip:sched/core] sched/fair: Remove stray space in #ifdef
  2018-02-13  8:59 [PATCH] sched: typo: remove space in #ifdef Vincent Guittot
  2018-02-13  9:05 ` Peter Zijlstra
@ 2018-02-13  9:37 ` tip-bot for Vincent Guittot
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Vincent Guittot @ 2018-02-13  9:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: vincent.guittot, linux-kernel, tglx, torvalds, peterz, mingo, hpa

Commit-ID:  387f77cc8249c847b4fa4d8c93694818b79efee3
Gitweb:     https://git.kernel.org/tip/387f77cc8249c847b4fa4d8c93694818b79efee3
Author:     Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Tue, 13 Feb 2018 09:59:42 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 13 Feb 2018 10:32:36 +0100

sched/fair: Remove stray space in #ifdef

Remove a useless space in # ifdef and align it with others.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1518512382-29426-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5eb3ffc..820f94c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2823,7 +2823,7 @@ void reweight_task(struct task_struct *p, int prio)
 }
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
-# ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
 /*
  * All this does is approximate the hierarchical proportion which includes that
  * global sum we all love to hate.
@@ -2974,7 +2974,7 @@ static long calc_group_runnable(struct cfs_rq *cfs_rq, long shares)
 
 	return clamp_t(long, runnable, MIN_SHARES, shares);
 }
-# endif /* CONFIG_SMP */
+#endif /* CONFIG_SMP */
 
 static inline int throttled_hierarchy(struct cfs_rq *cfs_rq);
 

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

end of thread, other threads:[~2018-02-13 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13  8:59 [PATCH] sched: typo: remove space in #ifdef Vincent Guittot
2018-02-13  9:05 ` Peter Zijlstra
2018-02-13  9:31   ` Ingo Molnar
2018-02-13  9:37 ` [tip:sched/core] sched/fair: Remove stray " tip-bot for Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome