Skip to content

Commit

Permalink
libceph: add __maybe_unused to DEFINE_CEPH_FEATURE
Browse files Browse the repository at this point in the history
Avoid -Wunused-const-variable warnings for "make W=1".

Reported-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
  • Loading branch information
Ilya Dryomov committed Aug 24, 2020
1 parent d012a71 commit f062f02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/linux/ceph/ceph_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
#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<<bit); \
static const uint64_t CEPH_FEATUREMASK_##name = \
static const uint64_t __maybe_unused CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t __maybe_unused CEPH_FEATUREMASK_##name = \
(1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);

/* this bit is ignored but still advertised by release *when* */
#define DEFINE_CEPH_FEATURE_DEPRECATED(bit, incarnation, name, when) \
static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
static const uint64_t __maybe_unused DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
static const uint64_t __maybe_unused DEPRECATED_CEPH_FEATUREMASK_##name = \
(1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);

/*
Expand Down

0 comments on commit f062f02

Please sign in to comment.