* [PATCH] libceph: fix old style declaration warnings
@ 2017-07-10 11:17 Arnd Bergmann
2017-07-10 13:17 ` Ilya Dryomov
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-07-10 11:17 UTC (permalink / raw)
To: Ilya Dryomov, Yan, Zheng, Sage Weil
Cc: Arnd Bergmann, ceph-devel, linux-kernel
The new macros don't follow the usual style for declarations,
which we get a warning for with 'make W=1':
In file included from fs/ceph/mds_client.c:16:0:
include/linux/ceph/ceph_features.h:74:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
This moves the 'static' keyword to the front of the
declaration.
Fixes: f179d3ba8cb9 ("libceph: new features macros")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/ceph/ceph_features.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index f0f6c537b64c..040dd105c3e7 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -10,14 +10,14 @@
#define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL
#define DEFINE_CEPH_FEATURE(bit, incarnation, name) \
- const static uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
- const static uint64_t CEPH_FEATUREMASK_##name = \
+ static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
+ static const uint64_t 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) \
- const static uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
- const static uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
+ static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
+ static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
(1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);
/*
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libceph: fix old style declaration warnings
2017-07-10 11:17 [PATCH] libceph: fix old style declaration warnings Arnd Bergmann
@ 2017-07-10 13:17 ` Ilya Dryomov
0 siblings, 0 replies; 2+ messages in thread
From: Ilya Dryomov @ 2017-07-10 13:17 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Yan, Zheng, Sage Weil, Ceph Development, linux-kernel
On Mon, Jul 10, 2017 at 1:17 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The new macros don't follow the usual style for declarations,
> which we get a warning for with 'make W=1':
>
> In file included from fs/ceph/mds_client.c:16:0:
> include/linux/ceph/ceph_features.h:74:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
>
> This moves the 'static' keyword to the front of the
> declaration.
>
> Fixes: f179d3ba8cb9 ("libceph: new features macros")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-10 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 11:17 [PATCH] libceph: fix old style declaration warnings Arnd Bergmann
2017-07-10 13:17 ` Ilya Dryomov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.