diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-06-08 04:55:33 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-12 13:00:55 -0400 |
commit | 57de72125d34f83bfd39615fcc3cc25ca3b9c0ec (patch) | |
tree | 235bacbf3f121016f9d2c747ba468e7a0609964a /kernel/cpu.c | |
parent | e5aeee51f6b4fb22e851105ee6d8ad211c40a214 (diff) |
cpu/hotplug: Remove unused check_for_tasks() function
clang -Wunused-function found one remaining function that was
apparently meant to be removed in a recent code cleanup:
kernel/cpu.c:565:20: warning: unused function 'check_for_tasks' [-Wunused-function]
Sebastian explained: The function became unused unintentionally, but there
is already a failure check, when a task cannot be removed from the outgoing
cpu in the scheduler code, so bringing it back is not really giving any
extra value.
Fixes: 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Link: http://lkml.kernel.org/r/20170608085544.2257132-1-arnd@arndb.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 7435ffc6163b..d0f5f54aa087 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -562,30 +562,6 @@ void clear_tasks_mm_cpumask(int cpu) | |||
562 | rcu_read_unlock(); | 562 | rcu_read_unlock(); |
563 | } | 563 | } |
564 | 564 | ||
565 | static inline void check_for_tasks(int dead_cpu) | ||
566 | { | ||
567 | struct task_struct *g, *p; | ||
568 | |||
569 | read_lock(&tasklist_lock); | ||
570 | for_each_process_thread(g, p) { | ||
571 | if (!p->on_rq) | ||
572 | continue; | ||
573 | /* | ||
574 | * We do the check with unlocked task_rq(p)->lock. | ||
575 | * Order the reading to do not warn about a task, | ||
576 | * which was running on this cpu in the past, and | ||
577 | * it's just been woken on another cpu. | ||
578 | */ | ||
579 | rmb(); | ||
580 | if (task_cpu(p) != dead_cpu) | ||
581 | continue; | ||
582 | |||
583 | pr_warn("Task %s (pid=%d) is on cpu %d (state=%ld, flags=%x)\n", | ||
584 | p->comm, task_pid_nr(p), dead_cpu, p->state, p->flags); | ||
585 | } | ||
586 | read_unlock(&tasklist_lock); | ||
587 | } | ||
588 | |||
589 | /* Take this CPU down. */ | 565 | /* Take this CPU down. */ |
590 | static int take_cpu_down(void *_param) | 566 | static int take_cpu_down(void *_param) |
591 | { | 567 | { |