Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757601AbcCRV06 (ORCPT ); Fri, 18 Mar 2016 17:26:58 -0400 Received: from www.linutronix.de ([62.245.132.108]:38631 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754279AbcCRV0Q (ORCPT ); Fri, 18 Mar 2016 17:26:16 -0400 From: Richard Cochran To: Cc: , Johannes Weiner , Michal Hocko , Vladimir Davydov , cgroups@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/5] mm: memcontrol: Remove redundant hot plug notifier test. Date: Fri, 18 Mar 2016 22:26:07 +0100 Message-Id: <1458336371-17748-1-git-send-email-rcochran@linutronix.de> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 30 The test for ONLINE is redundant because the following test for !DEAD already includes the online case. This patch removes the superfluous code. Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Richard Cochran --- mm/memcontrol.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d06cae2..993a261 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1916,9 +1916,6 @@ static int memcg_cpu_hotplug_callback(struct notifier_block *nb, int cpu = (unsigned long)hcpu; struct memcg_stock_pcp *stock; - if (action == CPU_ONLINE) - return NOTIFY_OK; - if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) return NOTIFY_OK; -- 2.1.4