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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 2B7D8C433E7 for ; Tue, 14 Jul 2020 12:53:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D147922472 for ; Tue, 14 Jul 2020 12:53:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="Woq8u2BW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D147922472 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 30E256B0002; Tue, 14 Jul 2020 08:53:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 297916B0003; Tue, 14 Jul 2020 08:53:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 160646B0005; Tue, 14 Jul 2020 08:53:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id F1A586B0002 for ; Tue, 14 Jul 2020 08:53:20 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8DD638248D51 for ; Tue, 14 Jul 2020 12:53:20 +0000 (UTC) X-FDA: 77036672160.01.prose06_3a0e49926ef1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 5752E500019EFBA3 for ; Tue, 14 Jul 2020 12:53:20 +0000 (UTC) X-HE-Tag: prose06_3a0e49926ef1 X-Filterd-Recvd-Size: 3510 Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 12:53:19 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4B5gRY3cgKz9sRf; Tue, 14 Jul 2020 22:53:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1594731193; bh=WxdhhT3xJBEpwVaUPSy80Amv6nH76of8j38ezETeGLI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Woq8u2BW6oF8HcstvzYhuBDqNwkPAn3B0zojk0Um0lQ5BHKFsN7KrSgP9e8JISs5Y TCnbrvzMTz0+EdMkB647PrbBbSJ0FmnUX5Vdm4PPSxm5KQoU6XY33uiijKfWMsIV3p /KgjgxQueAurUm1hLJ8TouS8bLXe9vibQqrO4SXKXKkmrKcLC4TwP3Mo2NNS/26ids 5Ki79z8DWDKUyg9TEXdknZrRDBhK3KMRdpyVFKpk1rcaNxdBTPWe5lLhPOXg5pDPvz w8Ywr6YDH83LvOimpxd/vCbOcbPzKwJSS8FDOZpj4Kf5moLG5Ct7877QsYAPjnhFkD pB7XVc4FRShEw== Date: Tue, 14 Jul 2020 22:53:11 +1000 From: Stephen Rothwell To: Bixuan Cui Cc: , , , , , Roman Gushchin Subject: Re: [PATCH] mm/percpu: mark pcpu_chunk_type() as __maybe_unused Message-ID: <20200714225311.7aeffffd@canb.auug.org.au> In-Reply-To: <20200714134101.80534-1-cuibixuan@huawei.com> References: <20200714134101.80534-1-cuibixuan@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/J=dR+cfYKKv=+cQfMInw+=E"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Rspamd-Queue-Id: 5752E500019EFBA3 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: --Sig_/J=dR+cfYKKv=+cQfMInw+=E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Bixuan, On Tue, 14 Jul 2020 13:41:01 +0000 Bixuan Cui wrote: > > Gcc report the following warning without CONFIG_MEMCG_KMEM: >=20 > 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) > ^~~~~~~~~~~~~~~ >=20 > Mark pcpu_chunk_type() as __maybe_unused to make it clear. Given that it is in a header file, it should probably just be "static inline" (which will also suppress the warning). As should pcpu_is_memcg_chunk() and pcpu_chunk_list(). Also, without them being inline, there will be a new copy for each file that mm/percpu-internal.h is included in. And that should be considered a fix for "mm: memcg/percpu: account percpu memory to memory cgroups". --=20 Cheers, Stephen Rothwell --Sig_/J=dR+cfYKKv=+cQfMInw+=E Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAl8NqrcACgkQAVBC80lX 0Gy1Ugf/Q/FkaGsEtMOw6s34DBkZttcN+Ayf2WPXZBy6iPueeNHxS6jToQ2/jQ5c zUJ4itvLutvGFlxVl9ULesKcYdQuwqCAoXgxUisPCLFPhFcBC2qKXRBObKNv+OI0 f9Ia6prDgnLNf5D/jX7SbVNBqnDJGwBQYG3XQBTv2c3dgJ40s6RPcEfjm83K6CUp WjVbgEfvqcN6aB6PoelT6+JtKNDrLfn38OAYzavri8p4KgRaLppO1e5gWBMOxtUE sQDJ7yilgfw3gxalrzzTTog7O0Fggx3LZrsfIFfVZVw5kZcxatC+64CbpCf3fAqT uvgGiL7yfkcMVw9JLqyn1ldzQ57lWQ== =zIOj -----END PGP SIGNATURE----- --Sig_/J=dR+cfYKKv=+cQfMInw+=E--