From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF715C433E3 for ; Tue, 14 Jul 2020 12:42:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8D067208FE for ; Tue, 14 Jul 2020 12:42:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D067208FE 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) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B0236B0003; Tue, 14 Jul 2020 08:42:47 -0400 (EDT) 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-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-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 Content-Type: text/plain; charset="UTF-8" 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 Content-Transfer-Encoding: quoted-printable 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: =E2=80=98pcpu_chunk_type=E2=80=99 d= efined 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(-) 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_chu= nk *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_c= hunk *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_c= hunk *chunk) { return PCPU_CHUNK_ROOT; } -- 2.17.1