Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp292393pxb; Wed, 18 Nov 2020 04:50:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLoQoJlFVSWv9s0QF3m6MYJlGzpRW1v1c2R0UcW9ou/PCRhZMuvoYbTkTQBtAQSiWC9zgI X-Received: by 2002:a17:906:39d7:: with SMTP id i23mr7066778eje.157.1605703857958; Wed, 18 Nov 2020 04:50:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605703857; cv=none; d=google.com; s=arc-20160816; b=YA6KmuFya5NWvA44QYPXKOEuAZIPrsWrWE9BpyX6N2eOlNoBu7LnzJ1cIkFdvZJIBu n1oXNzoWWa4WKbZSATaMxIB/S71PkEhTY/z3V/6Orp0IS71MXIwjxWoLVwKkPz8P5ghy jlNrYP61ZHRPtktHhHqFfK02XkNGU+6VCGDEJs6J71EGRWcQp9H2wHGhHf6skVxG1Joj J+N6BnQRRrzH/14R6WPNKf/B4HGtYBz69fpiAdljV8Hq04jmyhJccotz6GhirfiK5rlG DZs5zijm1boL263kfjQmdVdGnuKSs1hUMSw6Z3hf/o/0oFPkK/KaYS8RtbuQ0V3Lt/dR Q8eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I+Qzkkhk4C6GtBU8xVUeEofjQe9CXbPuBs8NdbyYcoo=; b=KIU2hPig679TDeuSfk7f3WSjhXjgYRkFKtsvGSQyvAFmGBH3ASoPY1GkBY3C1DKYc5 +fQWMSTdKuE3ZzzA42nHEKZjKwQ52wgNOku9aSLUM5+0U7WFZU+vpDU2OReDaqPrHSyX oc7TtoVI5SGWfoQoaY8KHL0mOJ5o5pqX9Cad1+P0c7gxc7LhGDdo95kpI+q6gxVF6Svd aBKHFI7SWYAarTYUEBw3PAlsNjR5zBGjc6xe/SCuiSyl2hiz0kYRiixbdx6QOi2j+CYc UBKhRQTNx4z1O8dAN5EYmZe3SOTyUlDf/0/cCiFa9XtNAQueZPneYMh+K+FpT4uF/BcX TQrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WCfWgtAO; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si18495249edn.398.2020.11.18.04.50.33; Wed, 18 Nov 2020 04:50:57 -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=@suse.com header.s=susede1 header.b=WCfWgtAO; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726644AbgKRMqU (ORCPT + 99 others); Wed, 18 Nov 2020 07:46:20 -0500 Received: from mx2.suse.de ([195.135.220.15]:53684 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgKRMqT (ORCPT ); Wed, 18 Nov 2020 07:46:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1605703578; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I+Qzkkhk4C6GtBU8xVUeEofjQe9CXbPuBs8NdbyYcoo=; b=WCfWgtAO+igB5OcpcKj8XOlT7ogXI+httgsZpXzYSpk3Km0SZhrb6ps0ZOT5fbIm96o19n vdUme6DBKNrcaRw6s/+riMxSYyKWQ6nn3SO4dsmP8RXVu+XeNwdfKVshKdhIM/P48G/xyx H/ktOrSgKNdjYtJKma1fDR8T0nAoays= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3BFBAAC91; Wed, 18 Nov 2020 12:46:18 +0000 (UTC) Date: Wed, 18 Nov 2020 13:46:17 +0100 From: Michal Hocko To: Lukas Bulwahn Cc: Roman Gushchin , Johannes Weiner , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, 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 Subject: Re: [PATCH] mm: memcg: remove obsolete memcg_has_children() Message-ID: <20201118124617.GR12284@dhcp22.suse.cz> References: <20201116055043.20886-1-lukas.bulwahn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116055043.20886-1-lukas.bulwahn@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 16-11-20 06:50:43, Lukas Bulwahn wrote: > 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 git grep agrees 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. > * > -- > 2.17.1 -- Michal Hocko SUSE Labs