* [patch] cgroup: move assignement out of condition in cgroup_attach_proc()
@ 2012-01-04 7:24 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-01-04 7:24 UTC (permalink / raw)
To: Tejun Heo
Cc: Li Zefan, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
cgroups-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
parentheses around assignment used as truth value [-Wparentheses]"
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
I feel like the original developer may have left the parens out on
deliberately to stop checkpatch.pl complaining about long lines. I so
much hate the long line warning...
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index cb3c131..6a057fe 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2175,9 +2175,12 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
oldcg = tc->task->cgroups;
/* if we don't already have it in the list get a new one */
- if (!css_set_check_fetched(cgrp, tc->task, oldcg, &newcg_list))
- if (retval = css_set_prefetch(cgrp, oldcg, &newcg_list))
+ if (!css_set_check_fetched(cgrp, tc->task, oldcg,
+ &newcg_list)) {
+ retval = css_set_prefetch(cgrp, oldcg, &newcg_list);
+ if (retval)
goto out_list_teardown;
+ }
}
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [patch] cgroup: move assignement out of condition in
@ 2012-01-04 7:24 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-01-04 7:24 UTC (permalink / raw)
To: kernel-janitors
Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
parentheses around assignment used as truth value [-Wparentheses]"
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I feel like the original developer may have left the parens out on
deliberately to stop checkpatch.pl complaining about long lines. I so
much hate the long line warning...
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index cb3c131..6a057fe 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2175,9 +2175,12 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
oldcg = tc->task->cgroups;
/* if we don't already have it in the list get a new one */
- if (!css_set_check_fetched(cgrp, tc->task, oldcg, &newcg_list))
- if (retval = css_set_prefetch(cgrp, oldcg, &newcg_list))
+ if (!css_set_check_fetched(cgrp, tc->task, oldcg,
+ &newcg_list)) {
+ retval = css_set_prefetch(cgrp, oldcg, &newcg_list);
+ if (retval)
goto out_list_teardown;
+ }
}
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [patch] cgroup: move assignement out of condition in cgroup_attach_proc()
@ 2012-01-04 7:24 Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-01-04 7:24 UTC (permalink / raw)
To: Tejun Heo
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
cgroups-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
parentheses around assignment used as truth value [-Wparentheses]"
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
I feel like the original developer may have left the parens out on
deliberately to stop checkpatch.pl complaining about long lines. I so
much hate the long line warning...
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index cb3c131..6a057fe 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2175,9 +2175,12 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
oldcg = tc->task->cgroups;
/* if we don't already have it in the list get a new one */
- if (!css_set_check_fetched(cgrp, tc->task, oldcg, &newcg_list))
- if (retval = css_set_prefetch(cgrp, oldcg, &newcg_list))
+ if (!css_set_check_fetched(cgrp, tc->task, oldcg,
+ &newcg_list)) {
+ retval = css_set_prefetch(cgrp, oldcg, &newcg_list);
+ if (retval)
goto out_list_teardown;
+ }
}
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [patch] cgroup: move assignement out of condition in cgroup_attach_proc()
2012-01-04 7:24 ` [patch] cgroup: move assignement out of condition in Dan Carpenter
@ 2012-01-04 15:38 ` Tejun Heo
-1 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2012-01-04 15:38 UTC (permalink / raw)
To: Dan Carpenter
Cc: Li Zefan, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
cgroups-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Wed, Jan 04, 2012 at 10:24:29AM +0300, Dan Carpenter wrote:
> Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
> parentheses around assignment used as truth value [-Wparentheses]"
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Applied to cgroup/for-3.3. Li, applied w/o your ack as it's trivial.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] cgroup: move assignement out of condition in cgroup_attach_proc()
[not found] ` <20120104072429.GF30978-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
@ 2012-01-04 15:38 ` Tejun Heo
2012-01-04 15:38 ` [patch] cgroup: move assignement out of condition in Tejun Heo
1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2012-01-04 15:38 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
cgroups-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Wed, Jan 04, 2012 at 10:24:29AM +0300, Dan Carpenter wrote:
> Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
> parentheses around assignment used as truth value [-Wparentheses]"
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Applied to cgroup/for-3.3. Li, applied w/o your ack as it's trivial.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] cgroup: move assignement out of condition in
@ 2012-01-04 15:38 ` Tejun Heo
0 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2012-01-04 15:38 UTC (permalink / raw)
To: kernel-janitors
On Wed, Jan 04, 2012 at 10:24:29AM +0300, Dan Carpenter wrote:
> Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
> parentheses around assignment used as truth value [-Wparentheses]"
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to cgroup/for-3.3. Li, applied w/o your ack as it's trivial.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-04 15:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 7:24 [patch] cgroup: move assignement out of condition in cgroup_attach_proc() Dan Carpenter
2012-01-04 7:24 ` [patch] cgroup: move assignement out of condition in Dan Carpenter
[not found] ` <20120104072429.GF30978-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-01-04 15:38 ` [patch] cgroup: move assignement out of condition in cgroup_attach_proc() Tejun Heo
2012-01-04 15:38 ` Tejun Heo
2012-01-04 15:38 ` [patch] cgroup: move assignement out of condition in Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2012-01-04 7:24 [patch] cgroup: move assignement out of condition in cgroup_attach_proc() Dan Carpenter
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.