From c09317f0ba07bc7c9af229b9bfb166be56792bbf Mon Sep 17 00:00:00 2001 From: Steve Guminski Date: Tue, 22 Nov 2016 13:43:52 -0500 Subject: [PATCH] LU-8776 build: Fix weird inline definitions This patch removes unnecessary inline keywords from functions that do not have to be inlined. It also corrects the ordering of the keywords in several functions from "inline static" to "static inline". Test-Parameters: trivial Signed-off-by: Steve Guminski Change-Id: I13dde114a803513b72d6497f42be460c4df06883 Reviewed-on: https://review.whamcloud.com/23979 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin --- lnet/klnds/gnilnd/gnilnd_cb.c | 4 ++-- lustre/contrib/wireshark/packet-lustre.c | 4 ++-- lustre/obdclass/genops.c | 2 +- lustre/utils/gss/write_bytes.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lnet/klnds/gnilnd/gnilnd_cb.c b/lnet/klnds/gnilnd/gnilnd_cb.c index b055ab0..bcf5c6d 100644 --- a/lnet/klnds/gnilnd/gnilnd_cb.c +++ b/lnet/klnds/gnilnd/gnilnd_cb.c @@ -302,7 +302,7 @@ kgnilnd_cksum(void *ptr, size_t nob) return sum; } -inline __u16 +__u16 kgnilnd_cksum_kiov(unsigned int nkiov, lnet_kiov_t *kiov, unsigned int offset, unsigned int nob, int dump_blob) { @@ -1656,7 +1656,7 @@ kgnilnd_sendmsg_trylock(kgn_tx_t *tx, void *immediate, unsigned int immediatenob } /* lets us know if we can push this RDMA through now */ -inline int +static int kgnilnd_auth_rdma_bytes(kgn_device_t *dev, kgn_tx_t *tx) { long bytes_left; diff --git a/lustre/contrib/wireshark/packet-lustre.c b/lustre/contrib/wireshark/packet-lustre.c index 593f285..bfd2b6c 100644 --- a/lustre/contrib/wireshark/packet-lustre.c +++ b/lustre/contrib/wireshark/packet-lustre.c @@ -1302,9 +1302,9 @@ plugin_reg_handoff(void) /* display functions */ /* ------------------------------------------------------------------- */ /* display str in left corner and in COL */ -/* TODO : do we need to use inline here ?*/ /* @gint col : the col where we add the information */ -inline static void display_info_str(proto_item *pi, column_info *cinfo, gint col, const gchar* str) +static void display_info_str(proto_item *pi, column_info *cinfo, gint col, + const gchar *str) { if (NULL !=pi) proto_item_append_text(pi, str); diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 54168e0..560ab8a 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -1937,7 +1937,7 @@ void *kuc_alloc(int payload_len, int transport, int type) EXPORT_SYMBOL(kuc_alloc); /* Takes pointer to payload area */ -inline void kuc_free(void *p, int payload_len) +void kuc_free(void *p, int payload_len) { struct kuc_hdr *lh = kuc_ptr(p); OBD_FREE(lh, kuc_len(payload_len)); diff --git a/lustre/utils/gss/write_bytes.h b/lustre/utils/gss/write_bytes.h index 4fc72cc..a9b24d8 100644 --- a/lustre/utils/gss/write_bytes.h +++ b/lustre/utils/gss/write_bytes.h @@ -35,7 +35,7 @@ #include #include /* for ntohl */ -inline static int +static inline int write_bytes(char **ptr, const char *end, const void *arg, int arg_len) { char *p = *ptr, *arg_end; @@ -50,7 +50,7 @@ write_bytes(char **ptr, const char *end, const void *arg, int arg_len) #define WRITE_BYTES(p, end, arg) write_bytes(p, end, &arg, sizeof(arg)) -inline static int +static inline int write_buffer(char **p, char *end, gss_buffer_desc *arg) { int len = (int)arg->length; /* make an int out of size_t */ @@ -63,7 +63,7 @@ write_buffer(char **p, char *end, gss_buffer_desc *arg) return 0; } -inline static int +static inline int write_oid(char **p, char *end, gss_OID_desc *arg) { int len = (int)arg->length; /* make an int out of size_t */ -- 1.8.3.1