From patchwork Fri Oct 5 16:18:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10628435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D722C1515 for ; Fri, 5 Oct 2018 16:19:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2646299AE for ; Fri, 5 Oct 2018 16:19:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B66EC299D2; Fri, 5 Oct 2018 16:19:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EBEF299AE for ; Fri, 5 Oct 2018 16:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729623AbeJEXSW (ORCPT ); Fri, 5 Oct 2018 19:18:22 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:46027 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728967AbeJEXSW (ORCPT ); Fri, 5 Oct 2018 19:18:22 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1M4p-1fjOZh2og7-012lnk; Fri, 05 Oct 2018 18:18:46 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1M4p-1fjOZh2og7-012lnk; Fri, 05 Oct 2018 18:18:46 +0200 From: Arnd Bergmann To: Ilya Dryomov , "Yan, Zheng" , Sage Weil Cc: Arnd Bergmann , Greg Kroah-Hartman , Philippe Ombredanne , Luis Henriques , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: use an enum instead of 'static const' to define constants Date: Fri, 5 Oct 2018 18:18:38 +0200 Message-Id: <20181005161845.959919-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:U7g/JovbVRmUvIWHMhDo9InnZSi8KsJh/pi3+A9ngUPNgizb2Hf W5RQ3Ipj5w4F+uq/eGlHnv0KHiu9E3Z3v8efvqvItWENnFaKoAgvkLL4ZQGyC4Df3naQzFW PaMRbzlR2g1ammXJ2S7ylluXYLtpMJYx6E8vLzMdiXeUJqmx572WOPRC75My6euQXLE0vcr sdzAMZ7vDKwFIJWEWNlrQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:DnMKUp3GjcI=:FqVSfnHXe1ZrtpryTC8gJm HANSyzqF8t2DogP+/YNO37uKFFLM3wXR9Upn6BNvsJYA2xMm/kVHZ1igEMxJcA8iURZ1bCqKA FESzZD7+nbCZev+CVx7QE1cvBIQZsqcIKLCZGdFnJtJjIBPewIcz/Y2vdAE5/HvmhRItG4+/E YQCMOBu6nzKvJIR1NxV2pwrv/pZWzFA2IjLKohM/8H+/J6JXSyKumJja/g2OL7K6f5Kmp9CtJ SBOPlLS1anV5cj958REeAlVKv5VBAqpKsRJjXDkPJB6HB0u1BPCQPYLYcQOWfGho1sxQ78PNU 1bcMgsUwjc8TpcqhKmGgTQRE2oVEQnH+C5MM4jTs/TkY49OgvxwOVmzzOLu5wS8ep/WOa5/jm sucpgYqUBbvD8uuJx2qgP4YIR5ENeiMHbL7WYcdCmbX9IqSUjm0V1zeD2p2U+BIvspLG+NmNU k4Y2AEfsSKxR5yevvBJdEESRgdWLLD3r39FVJoLPsL9C8UabPzOnfMgAXqZejyVMwQ+uvjFXh XPZIKVkB09UReAnAgcYuBQSgWlaEiMCLlYcbCxachz4mX0wgQ2TIhK6NbiW4q4LrAQxcFr90m XYnOvf0meOU5pT7XLOgrIfWLe7oiNk1A45nwEzdsgm0tThnNr0T0CPjjBbWunzjdm6eJXy4pd udV1YW/OZtQy4StF0H4w9D7vLaiVokUSIXzPy6S2/86CqmEh6wgaoiLoXXZMbYMUFIpU= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building with W=1 produces lots of warnings for files including ceph_features.h: include/linux/ceph/ceph_features.h:15:24: error: 'CEPH_FEATUREMASK_SERVER_M' defined but not used [-Werror=unused-const-variable=] The normal way to define compile-time constants in the kernel is to use either macros or enums, and gcc does not warn about those. Converting to an enum is simple here and means we can still use the names while debugging. Signed-off-by: Arnd Bergmann --- include/linux/ceph/ceph_features.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index 6b92b3395fa9..676908eca060 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h @@ -11,15 +11,15 @@ #define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL #define DEFINE_CEPH_FEATURE(bit, incarnation, name) \ - static const uint64_t CEPH_FEATURE_##name = (1ULL<