mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: Remove redundant #ifdef
@ 2015-05-14 11:31 kernel
  2015-05-14 20:07 ` [tip:sched/core] " tip-bot for Nikolay Borisov
  0 siblings, 1 reply; 5+ messages in thread
From: kernel @ 2015-05-14 11:31 UTC (permalink / raw)
  To: peterz, mingo; +Cc: linux-kernel, Nikolay Borisov

From: Nikolay Borisov <n.borisov@siteground.com>

2 Adjacent members in task_struct were guarded
by the same define, so no need to have the define twice

Signed-off-by: Nikolay Borisov <n.borisov@siteground.com>
---
 include/linux/sched.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 26a2e61..272d14e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1334,8 +1334,6 @@ struct task_struct {
 	int rcu_read_lock_nesting;
 	union rcu_special rcu_read_unlock_special;
 	struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
-#ifdef CONFIG_PREEMPT_RCU
 	struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
-- 
1.7.1


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

* [tip:sched/core] sched: Remove redundant #ifdef
  2015-05-14 11:31 [PATCH] sched: Remove redundant #ifdef kernel
@ 2015-05-14 20:07 ` tip-bot for Nikolay Borisov
  0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Nikolay Borisov @ 2015-05-14 20:07 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, peterz, hpa, torvalds, n.borisov, bp, mingo, tglx, efault

Commit-ID:  8c8a457a60050d5922676f81913d87e4af6fd97b
Gitweb:     http://git.kernel.org/tip/8c8a457a60050d5922676f81913d87e4af6fd97b
Author:     Nikolay Borisov <n.borisov@siteground.com>
AuthorDate: Thu, 14 May 2015 14:31:01 +0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 14 May 2015 20:04:43 +0200

sched: Remove redundant #ifdef

Two adjacent members in task_struct were guarded
by the same #define, so we can merge the two blocks.

Signed-off-by: Nikolay Borisov <n.borisov@siteground.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1431603061-29408-1-git-send-email-kernel@kyup.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0eceeec..5f8defa 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1398,8 +1398,6 @@ struct task_struct {
 	int rcu_read_lock_nesting;
 	union rcu_special rcu_read_unlock_special;
 	struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
-#ifdef CONFIG_PREEMPT_RCU
 	struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU

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

* Re: [PATCH] sched: Remove redundant #ifdef.
  2010-10-31  8:44 ` Ingo Molnar
@ 2010-10-31  9:01   ` Rakib Mullick
  0 siblings, 0 replies; 5+ messages in thread
From: Rakib Mullick @ 2010-10-31  9:01 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, LKML

On Sun, Oct 31, 2010 at 2:44 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Rakib Mullick <rakib.mullick@gmail.com> wrote:
>
>>  Remove redundant #ifdef to wrap struct cpupri. root_domain structure
>> is declared under #ifdef CONFIG_SMP, no need to use #ifdef again
>> inside the structure.
>>
>>
>> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
>> ---
>>
>> --- linus-36/kernel/sched.c   2010-10-21 02:30:22.000000000 +0600
>> +++ rakib-36/kernel/sched.c   2010-10-31 11:16:22.000000000 +0600
>> @@ -426,9 +426,7 @@ struct root_domain {
>>        */
>>       cpumask_var_t rto_mask;
>>       atomic_t rto_count;
>> -#ifdef CONFIG_SMP
>>       struct cpupri cpupri;
>> -#endif
>>  };
>
> The same patch was already sent by Christian Dietrich a few weeks ago, and it's
> upstream already:
>
>  ed2d372c0738: sched: Remove unnecessary #ifdef CONFIG_SMP
>

Ah... sorry for the noise :(. Should have checked it first. It seems
to me that I checked it..... but, certainly I missed it..


Thanks,

Rakib
> Thanks,
>
>        Ingo
>

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

* Re: [PATCH] sched: Remove redundant #ifdef.
  2010-10-31  5:56 [PATCH] " Rakib Mullick
@ 2010-10-31  8:44 ` Ingo Molnar
  2010-10-31  9:01   ` Rakib Mullick
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2010-10-31  8:44 UTC (permalink / raw)
  To: Rakib Mullick; +Cc: Peter Zijlstra, LKML


* Rakib Mullick <rakib.mullick@gmail.com> wrote:

>  Remove redundant #ifdef to wrap struct cpupri. root_domain structure
> is declared under #ifdef CONFIG_SMP, no need to use #ifdef again
> inside the structure.
> 
> 
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
> ---
> 
> --- linus-36/kernel/sched.c	2010-10-21 02:30:22.000000000 +0600
> +++ rakib-36/kernel/sched.c	2010-10-31 11:16:22.000000000 +0600
> @@ -426,9 +426,7 @@ struct root_domain {
>  	 */
>  	cpumask_var_t rto_mask;
>  	atomic_t rto_count;
> -#ifdef CONFIG_SMP
>  	struct cpupri cpupri;
> -#endif
>  };

The same patch was already sent by Christian Dietrich a few weeks ago, and it's 
upstream already:

 ed2d372c0738: sched: Remove unnecessary #ifdef CONFIG_SMP

Thanks,

	Ingo

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

* [PATCH] sched: Remove redundant #ifdef.
@ 2010-10-31  5:56 Rakib Mullick
  2010-10-31  8:44 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Rakib Mullick @ 2010-10-31  5:56 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, LKML

 Remove redundant #ifdef to wrap struct cpupri. root_domain structure
is declared under #ifdef CONFIG_SMP, no need to use #ifdef again
inside the structure.


Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

--- linus-36/kernel/sched.c	2010-10-21 02:30:22.000000000 +0600
+++ rakib-36/kernel/sched.c	2010-10-31 11:16:22.000000000 +0600
@@ -426,9 +426,7 @@ struct root_domain {
 	 */
 	cpumask_var_t rto_mask;
 	atomic_t rto_count;
-#ifdef CONFIG_SMP
 	struct cpupri cpupri;
-#endif
 };

 /*

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

end of thread, other threads:[~2015-05-14 20:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 11:31 [PATCH] sched: Remove redundant #ifdef kernel
2015-05-14 20:07 ` [tip:sched/core] " tip-bot for Nikolay Borisov
  -- strict thread matches above, loose matches on Subject: below --
2010-10-31  5:56 [PATCH] " Rakib Mullick
2010-10-31  8:44 ` Ingo Molnar
2010-10-31  9:01   ` Rakib Mullick

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