Skip to contentSkip to conversation

ceph: Move static keyword to the front of declarations

PATCH Applied Krzysztof Wilczynski 2 participants 2 messages Aug 31, 2019 – Sep 2, 2019 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: Move static keyword to the front of declarations

Move the static keyword to the front of declarations of snap_handle_length, handle_length and connected_handle_length, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

fs/ceph/export.c:38:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

fs/ceph/export.c:88:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

fs/ceph/export.c:90:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

---
Related: https://lore.kernel.org/r/[email protected]

 fs/ceph/export.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/ceph/export.c +3 -3
index 020d39a85ecc..b6bfa94332c3 100644
@@ -35,7 +35,7 @@ struct ceph_nfs_snapfh {
 static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len,
 			      struct inode *parent_inode)
 {
-	const static int snap_handle_length =
+	static const int snap_handle_length =
 		sizeof(struct ceph_nfs_snapfh) >> 2;
 	struct ceph_nfs_snapfh *sfh = (void *)rawfh;
 	u64 snapid = ceph_snap(inode);
@@ -85,9 +85,9 @@ static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len,
 static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
 			  struct inode *parent_inode)
 {
-	const static int handle_length =
+	static const int handle_length =
 		sizeof(struct ceph_nfs_fh) >> 2;
-	const static int connected_handle_length =
+	static const int connected_handle_length =
 		sizeof(struct ceph_nfs_confh) >> 2;
 	int type;
 
Signature · 1 line
2.22.1
maintainer Applied
#1 lore raw
Quoted 36 lines · Krzysztof Wilczynski

Move the static keyword to the front of declarations of snap_handle_length, handle_length and connected_handle_length, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

fs/ceph/export.c:38:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

fs/ceph/export.c:88:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

fs/ceph/export.c:90:2: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

---
Related: https://lore.kernel.org/r/[email protected]

 fs/ceph/export.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/ceph/export.c +1 -1
index 020d39a85ecc..b6bfa94332c3 100644
@@ -35,7 +35,7 @@ struct ceph_nfs_snapfh {
 static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len,
                              struct inode *parent_inode)
 {
-       const static int snap_handle_length =
+       static const int snap_handle_length =
                sizeof(struct ceph_nfs_snapfh) >> 2;
        struct ceph_nfs_snapfh *sfh = (void *)rawfh;
        u64 snapid = ceph_snap(inode);

fs/ceph/export.c static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len, · line 92

Quoted 10 lines
fs/ceph/export.c +2 -2
@@ -85,9 +85,9 @@ static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len,
 static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
                          struct inode *parent_inode)
 {
-       const static int handle_length =
+       static const int handle_length =
                sizeof(struct ceph_nfs_fh) >> 2;
-       const static int connected_handle_length =
+       static const int connected_handle_length =
                sizeof(struct ceph_nfs_confh) >> 2;
        int type;

Applied.

Thanks,

Ilya