staging: lustre: socklnd: remove socklnd_init_msg
authorJames Simmons <jsimmons@infradead.org>
Sun, 29 Jan 2017 00:05:17 +0000 (19:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 12:01:38 +0000 (13:01 +0100)
Remove the inline function socklnd_init_msg.
Its only used by the kernel code so no point
keeping it in an UAPI header.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/18506
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/lnet/socklnd.h
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c

index 7d24a9132e09db8c83f77816f2e573e5374ba018..acf20ce6f403c9c0d82dbc98685b33a55b1126b1 100644 (file)
@@ -80,15 +80,6 @@ typedef struct {
        } WIRE_ATTR ksm_u;
 } WIRE_ATTR ksock_msg_t;
 
-static inline void
-socklnd_init_msg(ksock_msg_t *msg, int type)
-{
-       msg->ksm_csum = 0;
-       msg->ksm_type = type;
-       msg->ksm_zc_cookies[0] = 0;
-       msg->ksm_zc_cookies[1] = 0;
-}
-
 #define KSOCK_MSG_NOOP 0xC0    /* ksm_u empty */
 #define KSOCK_MSG_LNET 0xC1    /* lnet msg */
 
index cbac88475b6cb9757dd0bf01485add7bfbc5017c..4c9f92725a4446249cc7b50535482eb70e041fed 100644 (file)
@@ -80,7 +80,9 @@ ksocknal_alloc_tx_noop(__u64 cookie, int nonblk)
        tx->tx_niov    = 1;
        tx->tx_nonblk  = nonblk;
 
-       socklnd_init_msg(&tx->tx_msg, KSOCK_MSG_NOOP);
+       tx->tx_msg.ksm_csum = 0;
+       tx->tx_msg.ksm_type = KSOCK_MSG_NOOP;
+       tx->tx_msg.ksm_zc_cookies[0] = 0;
        tx->tx_msg.ksm_zc_cookies[1] = cookie;
 
        return tx;
@@ -1004,7 +1006,10 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
                        tx->tx_zc_capable = 1;
        }
 
-       socklnd_init_msg(&tx->tx_msg, KSOCK_MSG_LNET);
+       tx->tx_msg.ksm_csum = 0;
+       tx->tx_msg.ksm_type = KSOCK_MSG_LNET;
+       tx->tx_msg.ksm_zc_cookies[0] = 0;
+       tx->tx_msg.ksm_zc_cookies[1] = 0;
 
        /* The first fragment will be set later in pro_pack */
        rc = ksocknal_launch_packet(ni, tx, target);