Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5879826ybf; Thu, 5 Mar 2020 08:44:56 -0800 (PST) X-Google-Smtp-Source: ADFU+vvY5r0koaisfIkAJi3bqbApnRQEcy+ZHUtlXxFN9V4rClAf8pZRQ4jSKz7G9w1Lcje3N0g8 X-Received: by 2002:a9d:7ccd:: with SMTP id r13mr7256615otn.80.1583426696540; Thu, 05 Mar 2020 08:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583426696; cv=none; d=google.com; s=arc-20160816; b=Yb8DV8A0mECmlntGOj4tt+x0w2GI8PFXCFIFPnx69dYm43RjP5V7LQpVCZj2FeuKXC jYY0ZGpwN7qlhOl2QYAXLfSBw+10dHe7p24t7Y0Qv4hB+or03+GB8yZFRenjDZSRvp9z DrDluvd39aNGUQoqz6qCx6prnLCDncnHxnmLZiD3wyXr6V2AduNKXG63y61CG+7mb60Z u0FG12Ts9B8VGZlozvP6aJhsWsGRPWvmriMYqPNBq+RhlODZDZ9QbO0aOOqFfIa474Ji Y2t8Nf6WUDIvyvLvtdntaGMpSnNxOn5kW+SFM883hmW7jgOLfi1CvFXRXSothqu7VV8j WwJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=eVMp1FukALdarJfwQmPHnq00+oa61TYClWDdE2Ezco8=; b=GarwwVWF+wC+ib0nUIRCqJglXfzNe2+QNdLMgDqJwVtvUzJKtta89zdimyP6FRNU49 74E7ecpzreYR6OgocDSNzolfHkRzF/kuKp/WcUvBFBNodV08QPWFlqLa//OCp++gu2oN XUh+LkI+BWUY/3m//ldxFWg6jvlmNCLtcauAF4kKRrhlW2diAvUAeC6GVJE3BkkcoFQb llrttjBMI/wzwrD02jxHRt0v56yxvTNlrcUPh+MVDTVuE5VInW8EMDqfXlOj1cFK1BMj l4MjCdyAYCZUfbiVe3NGrD/Qs3sMbd3R2oLRihSGy+xMUuo7MiNeWJuO2wo3CyuI6J7W F53Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g35si4037374otg.32.2020.03.05.08.44.44; Thu, 05 Mar 2020 08:44:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbgCEQoI (ORCPT + 99 others); Thu, 5 Mar 2020 11:44:08 -0500 Received: from foss.arm.com ([217.140.110.172]:51010 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbgCEQoH (ORCPT ); Thu, 5 Mar 2020 11:44:07 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 34BD330E; Thu, 5 Mar 2020 08:44:07 -0800 (PST) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 19CB93F534; Thu, 5 Mar 2020 08:44:05 -0800 (PST) From: Vincenzo Frascino To: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Vincenzo Frascino , Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton Subject: [PATCH v2] mm: Make mem_cgroup_id_get_many() __maybe_unused Date: Thu, 5 Mar 2020 16:43:54 +0000 Message-Id: <20200305164354.48147-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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