lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtDtJo2Vnziy9cLGyORqmN-1u+Mf=jKZmeKR0yMuHz1kuA@mail.gmail.com>
Date:   Tue, 14 Apr 2020 10:08:58 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Zou Wei <zou_wei@...wei.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH-next] sched/topology: use true, false for bool variable

On Mon, 13 Apr 2020 at 13:55, Zou Wei <zou_wei@...wei.com> wrote:
>
> Fixes coccicheck warning:
>
> kernel/sched/topology.c:224:3-22: WARNING: Assignment of 0/1 to bool variable
> kernel/sched/topology.c:226:3-22: WARNING: Assignment of 0/1 to bool variable
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zou Wei <zou_wei@...wei.com>

You will probably be interested by this thread
https://lkml.org/lkml/2020/3/27/785

> ---
>  kernel/sched/topology.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 8344757b..e4d6464 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -221,9 +221,9 @@ int sched_energy_aware_handler(struct ctl_table *table, int write,
>                 state = static_branch_unlikely(&sched_energy_present);
>                 if (state != sysctl_sched_energy_aware) {
>                         mutex_lock(&sched_energy_mutex);
> -                       sched_energy_update = 1;
> +                       sched_energy_update = true;
>                         rebuild_sched_domains();
> -                       sched_energy_update = 0;
> +                       sched_energy_update = false;
>                         mutex_unlock(&sched_energy_mutex);
>                 }
>         }
> --
> 2.6.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ