* [PATCH-next] sched/topology: use true, false for bool variable
@ 2020-04-13 12:01 Zou Wei
2020-04-14 8:08 ` Vincent Guittot
2020-04-14 9:26 ` Peter Zijlstra
0 siblings, 2 replies; 3+ messages in thread
From: Zou Wei @ 2020-04-13 12:01 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, linux-kernel
Cc: Zou Wei
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@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH-next] sched/topology: use true, false for bool variable
2020-04-13 12:01 [PATCH-next] sched/topology: use true, false for bool variable Zou Wei
@ 2020-04-14 8:08 ` Vincent Guittot
2020-04-14 9:26 ` Peter Zijlstra
1 sibling, 0 replies; 3+ messages in thread
From: Vincent Guittot @ 2020-04-14 8:08 UTC (permalink / raw)
To: Zou Wei
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Dietmar Eggemann,
Steven Rostedt, Ben Segall, Mel Gorman, linux-kernel
On Mon, 13 Apr 2020 at 13:55, Zou Wei <zou_wei@huawei.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@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH-next] sched/topology: use true, false for bool variable
2020-04-13 12:01 [PATCH-next] sched/topology: use true, false for bool variable Zou Wei
2020-04-14 8:08 ` Vincent Guittot
@ 2020-04-14 9:26 ` Peter Zijlstra
1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2020-04-14 9:26 UTC (permalink / raw)
To: Zou Wei
Cc: mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
bsegall, mgorman, linux-kernel
On Mon, Apr 13, 2020 at 08:01:21PM +0800, Zou Wei 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
Please shoot that script, it's broken crap.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-14 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 12:01 [PATCH-next] sched/topology: use true, false for bool variable Zou Wei
2020-04-14 8:08 ` Vincent Guittot
2020-04-14 9:26 ` Peter Zijlstra
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).