lkml.org 
[lkml]   [2011]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: Simplify task_group_is_autogroup
Date
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



\
 
 \ /
  Last update: 2011-12-18 12:47    [W:0.024 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site