In __next_wq_cpu() for_each_*wq_cpu(), the name WORK_CPU_LAST
is proper than WORK_CPU_NONE, convert them to WORK_CPU_LAST.

WORK_CPU_NONE is not used any more, just remove it.

Signed-off-by: Lai Jiangshan <[email protected]>
---
 include/linux/workqueue.h |    3 +--
 kernel/workqueue.c        |    8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index a94e4e8..2dcbacc 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -57,8 +57,7 @@ enum {
 
        /* special cpu IDs */
        WORK_CPU_UNBOUND        = NR_CPUS,
-       WORK_CPU_NONE           = NR_CPUS + 1,
-       WORK_CPU_LAST           = WORK_CPU_NONE,
+       WORK_CPU_LAST           = NR_CPUS + 1,
 
        /*
         * Reserve 7 bits off of cwq pointer w/ debugobjects turned
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 577de10..973b290 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -258,7 +258,7 @@ static inline int __next_wq_cpu(int cpu, const struct 
cpumask *mask,
                if (sw & 2)
                        return WORK_CPU_UNBOUND;
        }
-       return WORK_CPU_NONE;
+       return WORK_CPU_LAST;
 }
 
 static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask,
@@ -282,17 +282,17 @@ static inline int __next_cwq_cpu(int cpu, const struct 
cpumask *mask,
  */
 #define for_each_wq_cpu(cpu)                                           \
        for ((cpu) = __next_wq_cpu(-1, cpu_possible_mask, 3);           \
-            (cpu) < WORK_CPU_NONE;                                     \
+            (cpu) < WORK_CPU_LAST;                                     \
             (cpu) = __next_wq_cpu((cpu), cpu_possible_mask, 3))
 
 #define for_each_online_wq_cpu(cpu)                                    \
        for ((cpu) = __next_wq_cpu(-1, cpu_online_mask, 3);             \
-            (cpu) < WORK_CPU_NONE;                                     \
+            (cpu) < WORK_CPU_LAST;                                     \
             (cpu) = __next_wq_cpu((cpu), cpu_online_mask, 3))
 
 #define for_each_cwq_cpu(cpu, wq)                                      \
        for ((cpu) = __next_cwq_cpu(-1, cpu_possible_mask, (wq));       \
-            (cpu) < WORK_CPU_NONE;                                     \
+            (cpu) < WORK_CPU_LAST;                                     \
             (cpu) = __next_cwq_cpu((cpu), cpu_possible_mask, (wq)))
 
 #ifdef CONFIG_DEBUG_OBJECTS_WORK
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to