* [PATCH] sched: Simplify task_group_is_autogroup
@ 2011-12-18 10:12 Sisir Koppaka
2011-12-18 11:45 ` Nikunj A Dadhania
0 siblings, 1 reply; 2+ messages in thread
From: Sisir Koppaka @ 2011-12-18 10:12 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, linux-kernel
Removing the !! in task_group_is_autogroup doesn't impede functionality.
Tested with and without CONFIG_SCHED_AUTOGROUP.
Signed-off-by: Sisir Koppaka <sisir.koppaka@gmail.com>
---
kernel/sched/auto_group.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched/auto_group.h b/kernel/sched/auto_group.h
index 8bd0471..f628798 100644
--- a/kernel/sched/auto_group.h
+++ b/kernel/sched/auto_group.h
@@ -21,7 +21,7 @@ extern void autogroup_free(struct task_group *tg);
static inline bool task_group_is_autogroup(struct task_group *tg)
{
- return !!tg->autogroup;
+ return tg->autogroup;
}
extern bool task_wants_autogroup(struct task_struct *p, struct task_group *tg);
--
1.7.7.4
sk
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: Simplify task_group_is_autogroup
2011-12-18 10:12 [PATCH] sched: Simplify task_group_is_autogroup Sisir Koppaka
@ 2011-12-18 11:45 ` Nikunj A Dadhania
0 siblings, 0 replies; 2+ messages in thread
From: Nikunj A Dadhania @ 2011-12-18 11:45 UTC (permalink / raw)
To: Sisir Koppaka, Ingo Molnar, Peter Zijlstra, linux-kernel
On Sun, 18 Dec 2011 15:42:53 +0530, Sisir Koppaka <sisir.koppaka@gmail.com> wrote:
> Removing the !! in task_group_is_autogroup doesn't impede functionality.
>
> Tested with and without CONFIG_SCHED_AUTOGROUP.
>
> Signed-off-by: Sisir Koppaka <sisir.koppaka@gmail.com>
> ---
> kernel/sched/auto_group.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sched/auto_group.h b/kernel/sched/auto_group.h
> index 8bd0471..f628798 100644
> --- a/kernel/sched/auto_group.h
> +++ b/kernel/sched/auto_group.h
> @@ -21,7 +21,7 @@ extern void autogroup_free(struct task_group *tg);
>
> static inline bool task_group_is_autogroup(struct task_group *tg)
> {
> - return !!tg->autogroup;
> + return tg->autogroup;
>
The return is supposed to be a boolean. So the code is correct.
Regards,
Nikunj
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-18 11:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-18 10:12 [PATCH] sched: Simplify task_group_is_autogroup Sisir Koppaka
2011-12-18 11:45 ` Nikunj A Dadhania
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).