Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2873421pxb; Sun, 15 Nov 2020 22:04:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfA7EcsMClwNZi7fI72aoQFHULEj5RdBMMFuT80BH3jyfF7uADtHlbFTIzCKhcA2GCz3Ct X-Received: by 2002:aa7:dcd6:: with SMTP id w22mr14345016edu.19.1605506696235; Sun, 15 Nov 2020 22:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605506696; cv=none; d=google.com; s=arc-20160816; b=o1dIRG21SuICjKGgpNsEJ/2LFyx01hRSA17EIkrR5P+mMPiWgrk6LehrY0QIVTFnXG CIwwEVGVfuy8FD5b5C6+ieW4diRSCFS8dzvw4tV15Bx7J+gDqNfl0eqZoDMesNjal1Ey A+2rCahV89iWgb/9YYcJTIgSH/x0NPNmMxmNVzX3gedW6ayKu2Ge1cxz8NqvRv2sfBsK SDjI8OCsTg0RUbAoG8u5ZS/GhZf5bVqLXix0q7CXWQSvCNAswC+w/N1y9VzXKyfCnAT7 wRykXSKWPMJy6qANzTvblad35nNNEDp4tsWFiCpAoJo2Oozd8E9cPeg1MLovO9hygUVo CGGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=bMCt60rqT+zbnmmu8mIiXqNzcowO0BqJlZFilJ3Doeo=; b=bp1a3SU3qs+Dkno7HUbz8VMWL4hS76E3x/AmJfaslZe0P4+t2KCR/uOQdDPySrImvm tDnnyldnlmWtLSGskME75hMw/IxB6hQm4m8qJtgFoNqp0hBymvR2lfBZN3rM/W7vDatw KWp3joprEjNsE4CeAaoMYSGsg9s3c0322fBTuNPKAIqCe211c1CEG6gpGHkHZBdF05Hz hgTAFN9+f62iwx5Tl6wBgNcI1NiE2Tu66zFH8nse+gaEvpMtWExrw6eo0tTPDAimOfVP KbAZpSzmpaPBee8Vsa+HSToQREwbb7VEtuZ8OsnD6FVjW7pvD8/KAD6aX+1tnka9A9P0 4hqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l2N6UPXz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si11146575ejq.261.2020.11.15.22.04.33; Sun, 15 Nov 2020 22:04:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l2N6UPXz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726044AbgKPFu4 (ORCPT + 99 others); Mon, 16 Nov 2020 00:50:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725300AbgKPFuz (ORCPT ); Mon, 16 Nov 2020 00:50:55 -0500 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D888C0613CF; Sun, 15 Nov 2020 21:50:55 -0800 (PST) Received: by mail-ej1-x644.google.com with SMTP id f23so22759889ejk.2; Sun, 15 Nov 2020 21:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bMCt60rqT+zbnmmu8mIiXqNzcowO0BqJlZFilJ3Doeo=; b=l2N6UPXztssB0BIvdQTVtoH2uBhHn7UeL7GZOqiJHymxU/o40kBJboG/xwwJ0dZ+cw n1KO2j8bOsgqGfSu/Gks3g2zXimC/L45Zq1Vtw6IBhErbes7kYBG5Z4+iwogQJxm56yX 8eJtxaKvCz6uHpp/6j8Ow/A7n9mAFktsHac1tWj8Ihzt3aglcMo9yjTlUknFm5aaH2nW P3zfAIHUMuCP7T4vWeYCZL/dh4UbYvnzwzQrRAg97uqoMX4cfjg4Y+Rvz/Mx5rPpLvon KKdJ0tN6fWaK8sA144XP8eVvWUUAA4FY8HKz+VyprSzyZ8VqEozquOocB26xYFvnFQj+ OvVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bMCt60rqT+zbnmmu8mIiXqNzcowO0BqJlZFilJ3Doeo=; b=rqG7jxH8bLfItl64K/bp49UdV9xrcswWePumTqdPM3kgOTZ5Owy4EMUFiXI0rp2AF1 D3rzzLD9aBlFC4e6CCv/iPWpozkpH94oXzQmrQOrQmB21TVO4C0OK5AcH13XoCGGDXnV Bk3StGw08CMVRDrh9Y2jD7IYphpHIAtX+OZMXKi+G15hdbuQZoWjee0i5CreFVA9aKu8 RXcGYVyDCn3Q7ZEj4D8bT+utjYi9qzcD9jjnDIWroqSTi61rjzqBp7Ipy513oNjLGN1p 0mvo+DXZmPzbLQ5ZtNok0doKfIYWv9BL3CcRcb6atMUpW/ZsTwLOVPnmGLfwajN3Dlug LWvQ== X-Gm-Message-State: AOAM532COiRhhp+K1DUK2H9yVLFF1laFz5KXMC/1V84lBXBl9/9GjPHJ rl7EwKOUKHzPmIAZKHmfQb8= X-Received: by 2002:a17:906:3294:: with SMTP id 20mr13143545ejw.239.1605505853911; Sun, 15 Nov 2020 21:50:53 -0800 (PST) Received: from felia.fritz.box ([2001:16b8:2de6:ad00:939:47a9:70b9:fe5b]) by smtp.gmail.com with ESMTPSA id h24sm9907059ejg.15.2020.11.15.21.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 21:50:53 -0800 (PST) From: Lukas Bulwahn To: Roman Gushchin , Johannes Weiner , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org Cc: Michal Hocko , Vladimir Davydov , Arnd Bergmann , Tom Rix , Nathan Chancellor , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] mm: memcg: remove obsolete memcg_has_children() Date: Mon, 16 Nov 2020 06:50:43 +0100 Message-Id: <20201116055043.20886-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 2ef1bf118c40 ("mm: memcg: deprecate the non-hierarchical mode") removed the only use of memcg_has_children() in mem_cgroup_hierarchy_write() as part of the feature deprecation. Hence, since then, make CC=clang W=1 warns: mm/memcontrol.c:3421:20: warning: unused function 'memcg_has_children' [-Wunused-function] Simply remove this obsolete unused function. Signed-off-by: Lukas Bulwahn --- applies cleanly on next-20201113, not on current master Roman, please ack. Andrew, please pick this minor non-urgent patch into your -next tree. mm/memcontrol.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f95ddb3e9898..d49d7c507284 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3415,19 +3415,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, return nr_reclaimed; } -/* - * Test whether @memcg has children, dead or alive. - */ -static inline bool memcg_has_children(struct mem_cgroup *memcg) -{ - bool ret; - - rcu_read_lock(); - ret = css_next_child(NULL, &memcg->css); - rcu_read_unlock(); - return ret; -} - /* * Reclaims as many pages from the given memcg as possible. * -- 2.17.1