From patchwork Tue Jul 14 13:41:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bixuan Cui X-Patchwork-Id: 11662797 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 401FF13B6 for ; Tue, 14 Jul 2020 12:42:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 13BEB2242C for ; Tue, 14 Jul 2020 12:42:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13BEB2242C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 200406B0002; Tue, 14 Jul 2020 08:42:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1B0236B0003; Tue, 14 Jul 2020 08:42:47 -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 09F796B0005; Tue, 14 Jul 2020 08:42:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id E997B6B0002 for ; Tue, 14 Jul 2020 08:42:46 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 80B11180AD804 for ; Tue, 14 Jul 2020 12:42:46 +0000 (UTC) X-FDA: 77036645532.10.farm79_0d0954e26ef1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 4870816A0AB for ; Tue, 14 Jul 2020 12:42:46 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,cuibixuan@huawei.com,,RULES_HIT:30054,0,RBL:45.249.212.32:@huawei.com:.lbl8.mailshell.net-64.95.201.95 62.18.2.100;04yfzaykf5iifr17keuxdn64kpmp7op1uu5yo3y4695ixii3mhwk8kzhnaj6ior.aidaf6yg6btehigb58cr84rs3ubyaa69a5hr998zr6bgm59tqro65pb57uwpj36.r-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:41,LUA_SUMMARY:none X-HE-Tag: farm79_0d0954e26ef1 X-Filterd-Recvd-Size: 2384 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 12:42:45 +0000 (UTC) Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9ECCBDDF89920A824B6C; Tue, 14 Jul 2020 20:42:41 +0800 (CST) Received: from huawei.com (10.174.28.241) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Tue, 14 Jul 2020 20:42:33 +0800 From: Bixuan Cui To: CC: , , , , Subject: [PATCH] mm/percpu: mark pcpu_chunk_type() as __maybe_unused Date: Tue, 14 Jul 2020 13:41:01 +0000 Message-ID: <20200714134101.80534-1-cuibixuan@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.174.28.241] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 4870816A0AB X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Gcc report the following warning without CONFIG_MEMCG_KMEM: mm/percpu-internal.h:145:29: warning: ‘pcpu_chunk_type’ defined but not used [-Wunused-function] static enum pcpu_chunk_type pcpu_chunk_type(struct pcpu_chunk *chunk) ^~~~~~~~~~~~~~~ Mark pcpu_chunk_type() as __maybe_unused to make it clear. Signed-off-by: Bixuan Cui --- mm/percpu-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h index 7983455842ff..8a8a230bd957 100644 --- a/mm/percpu-internal.h +++ b/mm/percpu-internal.h @@ -129,7 +129,7 @@ static inline int pcpu_chunk_map_bits(struct pcpu_chunk *chunk) } #ifdef CONFIG_MEMCG_KMEM -static enum pcpu_chunk_type pcpu_chunk_type(struct pcpu_chunk *chunk) +static enum pcpu_chunk_type __maybe_unused pcpu_chunk_type(struct pcpu_chunk *chunk) { if (chunk->obj_cgroups) return PCPU_CHUNK_MEMCG; @@ -142,7 +142,7 @@ static bool pcpu_is_memcg_chunk(enum pcpu_chunk_type chunk_type) } #else -static enum pcpu_chunk_type pcpu_chunk_type(struct pcpu_chunk *chunk) +static enum pcpu_chunk_type __maybe_unused pcpu_chunk_type(struct pcpu_chunk *chunk) { return PCPU_CHUNK_ROOT; }