summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core_ctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/core_ctl.c b/kernel/sched/core_ctl.c
index ce15ae7fe76b..70cd0649ac9b 100644
--- a/kernel/sched/core_ctl.c
+++ b/kernel/sched/core_ctl.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2017, 2020 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -70,8 +70,8 @@ static struct cluster_data cluster_state[MAX_CLUSTERS];
static unsigned int num_clusters;
#define for_each_cluster(cluster, idx) \
- for ((cluster) = &cluster_state[idx]; (idx) < num_clusters;\
- (idx)++, (cluster) = &cluster_state[idx])
+ for (; (idx) < num_clusters && ((cluster) = &cluster_state[idx]);\
+ (idx)++)
static DEFINE_SPINLOCK(state_lock);
static void apply_need(struct cluster_data *state);