From patchwork Mon Nov 16 05:50:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 11907379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 075ED697 for ; Mon, 16 Nov 2020 05:50:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 904C322314 for ; Mon, 16 Nov 2020 05:50:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l2N6UPXz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 904C322314 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5C3636B0036; Mon, 16 Nov 2020 00:50:56 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 574666B005D; Mon, 16 Nov 2020 00:50:56 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43D326B0068; Mon, 16 Nov 2020 00:50:56 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id 14ADE6B0036 for ; Mon, 16 Nov 2020 00:50:56 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AEE39180AD81A for ; Mon, 16 Nov 2020 05:50:55 +0000 (UTC) X-FDA: 77489207670.02.hour12_020c4dc27326 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 95A2310097AA0 for ; Mon, 16 Nov 2020 05:50:55 +0000 (UTC) X-Spam-Summary: 1,0,0,b8a7d89ae3d46d88,d41d8cd98f00b204,lukas.bulwahn@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:968:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2731:3138:3139:3140:3141:3142:3352:3865:3866:3870:4321:5007:6261:6653:7514:7974:9413:9592:10004:11026:11658:11914:12043:12048:12114:12296:12297:12438:12517:12519:12555:12679:12895:12986:13069:13311:13357:14093:14096:14181:14384:14394:14687:14721:21080:21325:21444:21451:21627:21666:21990:30054,0,RBL:209.85.218.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yg5m1fbimuxboipqm3ompt6hyu1ypjzkjus1eigjn5oipe3iq6f7fbykmtdb5.tihdeir8g5cz8py75y8nr4dkwkhsaf7x9c3spu4gu8iyjwt3jq47x53sfcudw1a.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:69,LUA_SUMMARY:none X-HE-Tag: hour12_020c4dc27326 X-Filterd-Recvd-Size: 4319 Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Nov 2020 05:50:55 +0000 (UTC) Received: by mail-ej1-f67.google.com with SMTP id dk16so22651747ejb.12 for ; 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=IC3MyxsHGT6KUUTzaJNuG/eeQyXprTQhBnj1nDRbi8neNAAMT1bGmF2qu2kzb86Jf8 OiVwTyyqtNsi8b0qp48SNFPe5KK+p+0fFWzkTVWpRccq8qQhrYDlVDiZsnsrw1AmlIj3 OSWhlXu0/+HBnyF50PBYXPBRcs9HUKiO4181LPzJbEJaj27l+X0KJntug+n0UBBUCxxD QfGjAYh3q69usA3FlKAV0goN8TybXgB6NpxGRhuYFJ0zkzAsWxTCE5dKAFe5agL/h8Et JmzSPlETQUAaI0Hde1pg9XDftSIMwHfPL5uKYTC6EU1uM7SIBbbAlrvnnw8wbCrMu6g+ wtdw== X-Gm-Message-State: AOAM532CjXy0ccYJ1UdJbJRpoeG7E//tEw8TapE0nS/IwD8jDwlSaInZ LSqSpDqfl0zqoVTqGiZ8Drc= X-Google-Smtp-Source: ABdhPJxZbKUtzcgQIOuCyBy7CGfW5JkOEuHKZALohI5J1FH2WeJ62lL9BDzOSL78BB+LKiR25Ex7Hg== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: Roman Gushchin Reviewed-by: Nathan Chancellor Acked-by: Michal Hocko --- 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. *