Whamcloud - gitweb
LU-8776 build: Fix weird inline definitions 79/23979/2
authorSteve Guminski <stephenx.guminski@intel.com>
Tue, 22 Nov 2016 18:43:52 +0000 (13:43 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 23 Dec 2016 05:05:13 +0000 (05:05 +0000)
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 <stephenx.guminski@intel.com>
Change-Id: I13dde114a803513b72d6497f42be460c4df06883
Reviewed-on: https://review.whamcloud.com/23979
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd_cb.c
lustre/contrib/wireshark/packet-lustre.c
lustre/obdclass/genops.c
lustre/utils/gss/write_bytes.h

index b055ab0..bcf5c6d 100644 (file)
@@ -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;
index 593f285..bfd2b6c 100644 (file)
@@ -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);
index 54168e0..560ab8a 100644 (file)
@@ -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));
index 4fc72cc..a9b24d8 100644 (file)
@@ -35,7 +35,7 @@
 #include <sys/types.h>
 #include <netinet/in.h>                /* 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 */