From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753294AbdFLRHQ (ORCPT ); Mon, 12 Jun 2017 13:07:16 -0400 Received: from terminus.zytor.com ([65.50.211.136]:54747 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753790AbdFLRHN (ORCPT ); Mon, 12 Jun 2017 13:07:13 -0400 Date: Mon, 12 Jun 2017 10:04:16 -0700 From: tip-bot for Arnd Bergmann Message-ID: Cc: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, arnd@arndb.de, tglx@linutronix.de, peterz@infradead.org, anna-maria@linutronix.de, bigeasy@linutronix.de Reply-To: anna-maria@linutronix.de, bigeasy@linutronix.de, mingo@kernel.org, hpa@zytor.com, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org, arnd@arndb.de, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <20170608085544.2257132-1-arnd@arndb.de> References: <20170608085544.2257132-1-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] cpu/hotplug: Remove unused check_for_tasks() function Git-Commit-ID: 57de72125d34f83bfd39615fcc3cc25ca3b9c0ec X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 57de72125d34f83bfd39615fcc3cc25ca3b9c0ec Gitweb: http://git.kernel.org/tip/57de72125d34f83bfd39615fcc3cc25ca3b9c0ec Author: Arnd Bergmann AuthorDate: Thu, 8 Jun 2017 10:55:33 +0200 Committer: Thomas Gleixner CommitDate: Mon, 12 Jun 2017 19:00:55 +0200 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 Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Boris Ostrovsky Cc: Anna-Maria Gleixner Link: http://lkml.kernel.org/r/20170608085544.2257132-1-arnd@arndb.de Signed-off-by: Thomas Gleixner --- kernel/cpu.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 7435ffc..d0f5f54 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -562,30 +562,6 @@ void clear_tasks_mm_cpumask(int cpu) rcu_read_unlock(); } -static inline void check_for_tasks(int dead_cpu) -{ - struct task_struct *g, *p; - - read_lock(&tasklist_lock); - for_each_process_thread(g, p) { - if (!p->on_rq) - continue; - /* - * We do the check with unlocked task_rq(p)->lock. - * Order the reading to do not warn about a task, - * which was running on this cpu in the past, and - * it's just been woken on another cpu. - */ - rmb(); - if (task_cpu(p) != dead_cpu) - continue; - - pr_warn("Task %s (pid=%d) is on cpu %d (state=%ld, flags=%x)\n", - p->comm, task_pid_nr(p), dead_cpu, p->state, p->flags); - } - read_unlock(&tasklist_lock); -} - /* Take this CPU down. */ static int take_cpu_down(void *_param) {