All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] sched/core: fix formatting issues in sched_can_stop_tick()
@ 2014-04-15  4:25 Viresh Kumar
  2014-06-24  8:34 ` [PATCH V2 Resend] " Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2014-04-15  4:25 UTC (permalink / raw)
  To: peterz; +Cc: linaro-kernel, linux-kernel, mingo, fweisbec, Viresh Kumar

sched_can_stop_tick() was using 7 spaces instead of 8 spaces or a 'tab' at the
beginning of each line. Which doesn't align with the Coding Guidelines.

Also it removes the *rq variable as it was used at only one place and hence we
can directly use this_rq() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
V1->V2: Rebased over:

https://lkml.org/lkml/2014/3/19/456

 kernel/sched/core.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1fadf61..3a4bb63 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -666,19 +666,15 @@ static inline bool got_nohz_idle_kick(void)
 #ifdef CONFIG_NO_HZ_FULL
 bool sched_can_stop_tick(void)
 {
-       struct rq *rq;
-
-       rq = this_rq();
-
-       /*
-	* More than one running task need preemption.
-	* nr_running update is assumed to be visible
-	* after IPI is sent from wakers.
-	*/
-       if (rq->nr_running > 1)
-               return false;
+	/*
+	 * More than one running task need preemption.
+	 * nr_running update is assumed to be visible
+	 * after IPI is sent from wakers.
+	 */
+	if (this_rq()->nr_running > 1)
+		return false;
 
-       return true;
+	return true;
 }
 #endif /* CONFIG_NO_HZ_FULL */
 
-- 
1.7.12.rc2.18.g61b472e


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

* [PATCH V2 Resend] sched/core: fix formatting issues in sched_can_stop_tick()
  2014-04-15  4:25 [PATCH V2] sched/core: fix formatting issues in sched_can_stop_tick() Viresh Kumar
@ 2014-06-24  8:34 ` Viresh Kumar
  2014-07-05 10:43   ` [tip:sched/core] sched/core: Fix " tip-bot for Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2014-06-24  8:34 UTC (permalink / raw)
  To: peterz; +Cc: linux-kernel, mingo, fweisbec, Viresh Kumar

sched_can_stop_tick() is using 7 spaces instead of 8 spaces or a 'tab' at the
beginning of few lines. Which doesn't align well with the Coding Guidelines.

Also remove local variable 'rq' as it is used at only one place and we can
directly use this_rq() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Rebased again against tip/master ..

 kernel/sched/core.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7f3063c..866d840 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -736,19 +736,15 @@ static inline bool got_nohz_idle_kick(void)
 #ifdef CONFIG_NO_HZ_FULL
 bool sched_can_stop_tick(void)
 {
-       struct rq *rq;
-
-       rq = this_rq();
-
 	/*
 	 * More than one running task need preemption.
 	 * nr_running update is assumed to be visible
 	 * after IPI is sent from wakers.
 	 */
-       if (rq->nr_running > 1)
-               return false;
+	if (this_rq()->nr_running > 1)
+		return false;
 
-       return true;
+	return true;
 }
 #endif /* CONFIG_NO_HZ_FULL */
 
-- 
2.0.0.rc2


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

* [tip:sched/core] sched/core: Fix formatting issues in sched_can_stop_tick()
  2014-06-24  8:34 ` [PATCH V2 Resend] " Viresh Kumar
@ 2014-07-05 10:43   ` tip-bot for Viresh Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Viresh Kumar @ 2014-07-05 10:43 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, peterz, viresh.kumar, tglx

Commit-ID:  541b82644d72c1ef4a0587515a619712c1c19bd3
Gitweb:     http://git.kernel.org/tip/541b82644d72c1ef4a0587515a619712c1c19bd3
Author:     Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate: Tue, 24 Jun 2014 14:04:12 +0530
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 5 Jul 2014 11:17:28 +0200

sched/core: Fix formatting issues in sched_can_stop_tick()

sched_can_stop_tick() is using 7 spaces instead of 8 spaces or a 'tab' at the
beginning of few lines. Which doesn't align well with the Coding Guidelines.

Also remove local variable 'rq' as it is used at only one place and we can
directly use this_rq() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: fweisbec@gmail.com
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/afb781733e4a9ffbced5eb9fd25cc0aa5c6ffd7a.1403596966.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7f3063c..866d840 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -736,19 +736,15 @@ static inline bool got_nohz_idle_kick(void)
 #ifdef CONFIG_NO_HZ_FULL
 bool sched_can_stop_tick(void)
 {
-       struct rq *rq;
-
-       rq = this_rq();
-
 	/*
 	 * More than one running task need preemption.
 	 * nr_running update is assumed to be visible
 	 * after IPI is sent from wakers.
 	 */
-       if (rq->nr_running > 1)
-               return false;
+	if (this_rq()->nr_running > 1)
+		return false;
 
-       return true;
+	return true;
 }
 #endif /* CONFIG_NO_HZ_FULL */
 

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

end of thread, other threads:[~2014-07-05 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  4:25 [PATCH V2] sched/core: fix formatting issues in sched_can_stop_tick() Viresh Kumar
2014-06-24  8:34 ` [PATCH V2 Resend] " Viresh Kumar
2014-07-05 10:43   ` [tip:sched/core] sched/core: Fix " tip-bot for Viresh Kumar

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.