Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5977284ybf; Thu, 5 Mar 2020 10:37:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vtgIEPV1szXwwO9T3EzitceUhIhgGQa/Zao4ZUOG21/HYVROuiPZ73iMl7bm//LLg/pRcT1 X-Received: by 2002:a05:6830:2388:: with SMTP id l8mr7500315ots.128.1583433424917; Thu, 05 Mar 2020 10:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583433424; cv=none; d=google.com; s=arc-20160816; b=bg1/kpkn6XOXMS/+yujcAuQLy9y8gdf9HCNoY9Pa+aOFDCPt7hdF1lDrsdL3chrGH7 j1Cou65eJfpFRuJZNvHO4I+3nhGHBiuDn8d9JoILzl+oMy/3zTAfTpz753vpfZlOhqqD bTRqKD+N4+d01IgpVZ0tzJqlOqG19LMyGeZqFUGDH5MhF7gjttcyHj495NHMdqw4nMGC lHgjLUAP2FAPdPW8SXnX/ZhDP/r1CXEXCsejNS1uaQbOrjadnwZYEhKFIDgnswP3tQe9 T8AWgKkqXDtvEYRf9IMaob93hlvQDcJzWmx3sJkle1koPpg3YNGJvCpKGKBpAC/uOQ2I iPIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NuoA3fuPswQR3q6MZEyPSq0NTYh8WVfp4GhRULEWRIY=; b=CExtVcMlUfC9YVbi8Vvflxbw1Y6GhewS5uXmbnd/iGTCAaxVosbyKqPVd/Qljedx9/ gH+j+JONnRPzh+vX1O7ZFhlAbw0edHcHGrIrmE/Iq1iwRYPXzNilE85eFfMR6Qx+es/d rJxB3D+NDDVQZpKWUR+Wljr8tnVaUw5DkcaHuiBxHBt430dlxsQ6mqkqT883X05TvEcV Ygn1Wno9AP6buIjDhwPC8qFOs0czUDCDoCYF+05XmCJKdljdQfusWe7dtTcFuyIfeSDp KcXd0QbYD8wZDxMu2MKYA32wcB/Ec//hzW08cJE55/MJI6eQPI4k0GM8EA74y8GbmAP/ VVbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=RR6nLtAN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si3907050otq.253.2020.03.05.10.36.52; Thu, 05 Mar 2020 10:37:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=RR6nLtAN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbgCESgS (ORCPT + 99 others); Thu, 5 Mar 2020 13:36:18 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44367 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbgCESgR (ORCPT ); Thu, 5 Mar 2020 13:36:17 -0500 Received: by mail-wr1-f66.google.com with SMTP id n7so8239685wrt.11 for ; Thu, 05 Mar 2020 10:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=NuoA3fuPswQR3q6MZEyPSq0NTYh8WVfp4GhRULEWRIY=; b=RR6nLtANxW9IiN4v3USYLxGNCnrYUqcerZ41dSbNfgtylvE//xJdTrZEBL+kNgm39E GW38qiN3bLqBFwcftKaWbuQrsZfUGSiWHD1yTQOF/wl6lElGraB+5LU/2usxQN+DFhcE oci1LJb9PY8XkR1F4BEGDEgap7+++0Iv12xcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=NuoA3fuPswQR3q6MZEyPSq0NTYh8WVfp4GhRULEWRIY=; b=q3uGXoCKdNp5M+T/QJihKh4rFlQExG+tQr68sWIhkFEYmWn3iVT9RlNpAju6Uf5Szy HsICjHR/nlj5gUuUz/kWhPCf2T9J+sL9P5+Bqt4xShET3nZQy1sGwROMTh5F20TzxT1e A94Vdl0piEahfVTkmf0lHQPThnPn/7t3pP2oN10xPE4Rin1Di9OwIol4TzqGr0eAimbM duSpuyNCO5O9mVaotcP8gJeDr9YHZotErVXpkiHtJ7pK5AC92QoFvUI/bTYvZsvzg8RS md649iJSXDByZe2p67xYOfUUYTIFWbucovc8HGHSk8D3tgtvf7PjXT2CQTTHpMLy74yc XyLA== X-Gm-Message-State: ANhLgQ3CuIFTe+L+hdIVRSX8VThWZUd2HTuoCs80uOp2TpacA3rWjZOV RqN+NXmCcYCz+nEuwX+LpE5csg== X-Received: by 2002:a05:6000:100d:: with SMTP id a13mr258226wrx.330.1583433375392; Thu, 05 Mar 2020 10:36:15 -0800 (PST) Received: from localhost ([2620:10d:c092:180::1:6808]) by smtp.gmail.com with ESMTPSA id x17sm5432831wrt.31.2020.03.05.10.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 10:36:15 -0800 (PST) Date: Thu, 5 Mar 2020 18:36:14 +0000 From: Chris Down To: Vincenzo Frascino Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton Subject: Re: [PATCH v2] mm: Make mem_cgroup_id_get_many() __maybe_unused Message-ID: <20200305183614.GB752201@chrisdown.name> References: <20200305164354.48147-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200305164354.48147-1-vincenzo.frascino@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vincenzo Frascino writes: >mem_cgroup_id_get_many() is currently used only when MMU or MEMCG_SWAP >configuration options are enabled. Having them disabled triggers the >following warning at compile time: > >linux/mm/memcontrol.c:4797:13: warning: ‘mem_cgroup_id_get_many’ defined >but not used [-Wunused-function] > static void mem_cgroup_id_get_many(struct mem_cgroup *memcg, unsigned > int n) > >Make mem_cgroup_id_get_many() __maybe_unused to address the issue. > >Cc: Johannes Weiner >Cc: Michal Hocko >Cc: Vladimir Davydov >Cc: Andrew Morton >Signed-off-by: Vincenzo Frascino Thanks, I didn't notice you've already posted it before replying on v1 :-) Acked-by: Chris Down >--- > mm/memcontrol.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/mm/memcontrol.c b/mm/memcontrol.c >index d09776cd6e10..2b9533ed52f5 100644 >--- a/mm/memcontrol.c >+++ b/mm/memcontrol.c >@@ -4794,7 +4794,8 @@ static void mem_cgroup_id_remove(struct mem_cgroup *memcg) > } > } > >-static void mem_cgroup_id_get_many(struct mem_cgroup *memcg, unsigned int n) >+static void __maybe_unused mem_cgroup_id_get_many(struct mem_cgroup *memcg, >+ unsigned int n) > { > refcount_add(n, &memcg->id.ref); > } >-- >2.25.1 > >