From: Arnd Bergmann 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> Return-path: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: ceph-devel.vger.kernel.org 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<