* [PATCH] Fix braces to GNU style
@ 2015-03-25 1:59 carlossilveirajr
2015-03-25 8:58 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: carlossilveirajr @ 2015-03-25 1:59 UTC (permalink / raw)
To: mingo; +Cc: peterz, linux-kernel, Carlos Roberto Silveira Junior
From: Carlos Roberto Silveira Junior <carlossilveirajr@gmail.com>
---
kernel/sched/fair.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7ce18f3..834aa55 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -296,13 +296,12 @@ static inline void list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq)
* reduces this to two cases.
*/
if (cfs_rq->tg->parent &&
- cfs_rq->tg->parent->cfs_rq[cpu_of(rq_of(cfs_rq))]->on_list) {
+ cfs_rq->tg->parent->cfs_rq[cpu_of(rq_of(cfs_rq))]->on_list)
list_add_rcu(&cfs_rq->leaf_cfs_rq_list,
&rq_of(cfs_rq)->leaf_cfs_rq_list);
- } else {
+ else
list_add_tail_rcu(&cfs_rq->leaf_cfs_rq_list,
&rq_of(cfs_rq)->leaf_cfs_rq_list);
- }
cfs_rq->on_list = 1;
/* We should have no load, but we need to update last_decay. */
@@ -505,9 +504,9 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
* We dont care about collisions. Nodes with
* the same key stay together.
*/
- if (entity_before(se, entry)) {
+ if (entity_before(se, entry))
link = &parent->rb_left;
- } else {
+ else {
link = &parent->rb_right;
leftmost = 0;
}
--
2.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Fix braces to GNU style
2015-03-25 1:59 [PATCH] Fix braces to GNU style carlossilveirajr
@ 2015-03-25 8:58 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2015-03-25 8:58 UTC (permalink / raw)
To: carlossilveirajr; +Cc: mingo, peterz, linux-kernel
* carlossilveirajr@gmail.com <carlossilveirajr@gmail.com> wrote:
> From: Carlos Roberto Silveira Junior <carlossilveirajr@gmail.com>
>
> ---
> kernel/sched/fair.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7ce18f3..834aa55 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -296,13 +296,12 @@ static inline void list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq)
> * reduces this to two cases.
> */
> if (cfs_rq->tg->parent &&
> - cfs_rq->tg->parent->cfs_rq[cpu_of(rq_of(cfs_rq))]->on_list) {
> + cfs_rq->tg->parent->cfs_rq[cpu_of(rq_of(cfs_rq))]->on_list)
> list_add_rcu(&cfs_rq->leaf_cfs_rq_list,
> &rq_of(cfs_rq)->leaf_cfs_rq_list);
> - } else {
> + else
> list_add_tail_rcu(&cfs_rq->leaf_cfs_rq_list,
> &rq_of(cfs_rq)->leaf_cfs_rq_list);
> - }
>
> cfs_rq->on_list = 1;
> /* We should have no load, but we need to update last_decay. */
> @@ -505,9 +504,9 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
> * We dont care about collisions. Nodes with
> * the same key stay together.
> */
> - if (entity_before(se, entry)) {
> + if (entity_before(se, entry))
> link = &parent->rb_left;
> - } else {
> + else {
> link = &parent->rb_right;
> leftmost = 0;
> }
But in the kernel we are following the Linux kernel style.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-25 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 1:59 [PATCH] Fix braces to GNU style carlossilveirajr
2015-03-25 8:58 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox