From patchwork Tue Oct 1 14:22:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11168861 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 B184B13B1 for ; Tue, 1 Oct 2019 14:22:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7DA1521D82 for ; Tue, 1 Oct 2019 14:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DA1521D82 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B56068E0005; Tue, 1 Oct 2019 10:22:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B2C0F8E0001; Tue, 1 Oct 2019 10:22:38 -0400 (EDT) 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 A41938E0005; Tue, 1 Oct 2019 10:22:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 8082B8E0001 for ; Tue, 1 Oct 2019 10:22:38 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3F0BC180AD802 for ; Tue, 1 Oct 2019 14:22:38 +0000 (UTC) X-FDA: 75995431596.05.jump71_6e40160c5ac3c X-Spam-Summary: 2,0,0,ef9d68ca0eaec361,d41d8cd98f00b204,arnd@arndb.de,:hannes@cmpxchg.org:mhocko@kernel.org:vdavydov.dev@gmail.com:arnd@arndb.de:cai@lca.pw:mhocko@suse.com:akpm@linux-foundation.org:guro@fb.com:shakeelb@google.com:chris@chrisdown.name:tj@kernel.org:cgroups@vger.kernel.org::linux-kernel@vger.kernel.org:clang-built-linux@googlegroups.com,RULES_HIT:41:355:379:541:800:960:968:988:989:1260:1311:1314:1345:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3870:3871:3872:3874:4321:5007:6261:6742:10004:11026:11658:11914:12043:12160:12296:12297:12438:12555:12679:12895:13069:13180:13229:13311:13357:13894:14096:14181:14384:14394:14721:21080:21451:21627:21740:21966:30003:30054:30080,0,RBL:217.72.192.74:@arndb.de:.lbl8.mailshell.net-62.14.6.100 66.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: jump71_6e40160c5ac3c X-Filterd-Recvd-Size: 3668 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Oct 2019 14:22:37 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MtfeD-1i0GXA0Ilb-00v9b6; Tue, 01 Oct 2019 16:22:31 +0200 From: Arnd Bergmann To: Johannes Weiner , Michal Hocko , Vladimir Davydov Cc: Arnd Bergmann , Qian Cai , Michal Hocko , Andrew Morton , Roman Gushchin , Shakeel Butt , Chris Down , Tejun Heo , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] mm/memcontrol.c: fix another unused function warning Date: Tue, 1 Oct 2019 16:22:12 +0200 Message-Id: <20191001142227.1227176-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:figbJF5L6G0XEWx7vE37p+1HREP4pdaUF1hixuKWiSXi1WhSqjN 1mFGZ1tTDFVzveitQ5dJm1AfeFw4+iQGprrZcQpcp3bgMfPAhxpWPB+9wFKeiUuUZZIh2io fKyAJSH7VFXtGs7nVJ2mRRs08ZUxBzWzQqfb+pARALNWlmIGBdxJ3hgENkjgKXJrT63booJ oF8KApMv5rp9nj27TuJow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:cz+DaDPdK8A=:2nL8zO8obyUue8/B1m31Mw w7MDPepr2NIk/8jEqB17L8KReB0/sC8EuopUyWdwqJqlVcvp3IQxT2oKvNAJVDKUnviue6PeR wIcmeLA66NBBAU4oXNJhVez6AvFXLQ5pmYeEAr1ifiNfKKoNiU7quSbvLMSnWI4vHmEIn8EY8 YWevjG+lYEUkz/gxRFFwQLNgF8cTE4qrsNGE7ZhE4GzS8Bqttluzugmj690TKdGNVNOPTVNOW wUOMhG58H6zDpFSVAXPrAjtUdf6LKC8aHbM2oZz0fCxNiD0UtxN15MbsAEX2/BnNGgzZDIZ5Z nFzqD+I/8uHKBRL6BGc540dfvuRUHxZaihiL3sC7pEDhnfPLqRAQhdagKAGVPy+dQr59WsDKI /U7PN60uf17KvbPNoh2oJxNUYZHDtYm9ClaXAmkLLtxS6H5Pq7+02FwhUQF8Bpcdc4unnK17I yjxptXPhtiFjgWbf7y6KGYFe0VgGsOTABwaetxrbxERmrNiuZmMrs68HaJhJNpJerd7TFFapt 4S3LG3iz/3iK/Lvpxg8eSOSe3tfEu8HiqHFe+DKOLglC9DLB6JcAUtXvsDHlrF17J+sgDkQhc 2qXBl2X+ugs/PMXMBsT1CoXL3Va/faJ77hBN4msDlp+BTP5ND57SWAqR66UxTtUeF9YcZqiu1 9nAgc0uz6fFA4PEe23LNPB4p3mFah+U+Zi0gz8FUDrxlnIhcDkHC+nnPIHWbH5B8F6sSHYXXZ 9mbOaXyAtbDR/icX0VfPaEESg1YMZNQ+e1zqPdMxSwDClUDfAgVg0VF2MjwtjcdZbsnh4/k6m jniImRYGrZzQZvT0JS/EtY/rVgs/bFaeuc73VNwLShU10MDLcsW/CUEUHfbHeQ+bbjPfsL8IQ ILrUXkj5IUCXuCgsn66Q== 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: Removing the mem_cgroup_id_get() stub function introduced a new warning of the same kind when CONFIG_MMU is disabled: mm/memcontrol.c:4929:13: error: unused function 'mem_cgroup_id_get_many' [-Werror,-Wunused-function] Address this using a __maybe_unused annotation. Note: alternatively, this could be moved into an #ifdef block. Marking it 'static inline' would not work here as that would still produce the warning on clang, which only ignores unused inline functions declared in header files instead of .c files. Fixes: 4d0e3230a56a ("mm/memcontrol.c: fix a -Wunused-function warning") Signed-off-by: Arnd Bergmann --- mm/memcontrol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c313c49074ca..5f9f90e3cef8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4921,7 +4921,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); }