From nobody Sun Feb 8 11:21:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAAB3C001DF for ; Wed, 2 Aug 2023 06:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232489AbjHBG6a (ORCPT ); Wed, 2 Aug 2023 02:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232486AbjHBG62 (ORCPT ); Wed, 2 Aug 2023 02:58:28 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81069E71 for ; Tue, 1 Aug 2023 23:58:26 -0700 (PDT) Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4RG2pn40wPz1GDGG; Wed, 2 Aug 2023 14:57:21 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.202) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 2 Aug 2023 14:58:23 +0800 From: Zhu Wang To: , CC: Subject: [PATCH -next] efs: fix -Wunused-const-variable= warning Date: Wed, 2 Aug 2023 14:57:53 +0800 Message-ID: <20230802065753.217179-1-wangzhu9@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.202] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500025.china.huawei.com (7.185.36.35) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with W=3D1, the following warning occurs. In file included from fs/efs/super.c:18:0: fs/efs/efs.h:22:19: warning: =E2=80=98cprt=E2=80=99 defined but not used [-= Wunused-const-variable=3D] static const char cprt[] =3D "EFS: "EFS_VERSION" - (c) 1999 Al Smith "; ^~~~ The header file is included in many C files, there are many similar errors which are not included here. We add __maybe_unsed to remove it. Fixes: 45254b4fb2ae ("efs: move headers out of include/linux/") Signed-off-by: Zhu Wang --- fs/efs/efs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/efs/efs.h b/fs/efs/efs.h index 13a4d9622633..8202be1b2ade 100644 --- a/fs/efs/efs.h +++ b/fs/efs/efs.h @@ -19,7 +19,8 @@ =20 #define EFS_VERSION "1.0a" =20 -static const char cprt[] =3D "EFS: "EFS_VERSION" - (c) 1999 Al Smith "; +static const char __maybe_unused cprt[] =3D + "EFS: "EFS_VERSION" - (c) 1999 Al Smith "; =20 =20 /* 1 block is 512 bytes */ --=20 2.17.1