aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2017-01-28 19:05:17 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 07:01:38 -0500
commit04d8615889c82ece568afa0fe208f7ef9ab90063 (patch)
treed5e4089ddf1e56a90d9b4b9dc3c51e8d5b5ed9e8
parent6cd67869214c3c80de7ab00fb8d1f7daada952e6 (diff)
staging: lustre: socklnd: remove socklnd_init_msg
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>
-rw-r--r--drivers/staging/lustre/include/linux/lnet/socklnd.h9
-rw-r--r--drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c9
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index 7d24a9132e09..acf20ce6f403 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -80,15 +80,6 @@ typedef struct {
80 } WIRE_ATTR ksm_u; 80 } WIRE_ATTR ksm_u;
81} WIRE_ATTR ksock_msg_t; 81} WIRE_ATTR ksock_msg_t;
82 82
83static inline void
84socklnd_init_msg(ksock_msg_t *msg, int type)
85{
86 msg->ksm_csum = 0;
87 msg->ksm_type = type;
88 msg->ksm_zc_cookies[0] = 0;
89 msg->ksm_zc_cookies[1] = 0;
90}
91
92#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */ 83#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */
93#define KSOCK_MSG_LNET 0xC1 /* lnet msg */ 84#define KSOCK_MSG_LNET 0xC1 /* lnet msg */
94 85
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index cbac88475b6c..4c9f92725a44 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -80,7 +80,9 @@ ksocknal_alloc_tx_noop(__u64 cookie, int nonblk)
80 tx->tx_niov = 1; 80 tx->tx_niov = 1;
81 tx->tx_nonblk = nonblk; 81 tx->tx_nonblk = nonblk;
82 82
83 socklnd_init_msg(&tx->tx_msg, KSOCK_MSG_NOOP); 83 tx->tx_msg.ksm_csum = 0;
84 tx->tx_msg.ksm_type = KSOCK_MSG_NOOP;
85 tx->tx_msg.ksm_zc_cookies[0] = 0;
84 tx->tx_msg.ksm_zc_cookies[1] = cookie; 86 tx->tx_msg.ksm_zc_cookies[1] = cookie;
85 87
86 return tx; 88 return tx;
@@ -1004,7 +1006,10 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
1004 tx->tx_zc_capable = 1; 1006 tx->tx_zc_capable = 1;
1005 } 1007 }
1006 1008
1007 socklnd_init_msg(&tx->tx_msg, KSOCK_MSG_LNET); 1009 tx->tx_msg.ksm_csum = 0;
1010 tx->tx_msg.ksm_type = KSOCK_MSG_LNET;
1011 tx->tx_msg.ksm_zc_cookies[0] = 0;
1012 tx->tx_msg.ksm_zc_cookies[1] = 0;
1008 1013
1009 /* The first fragment will be set later in pro_pack */ 1014 /* The first fragment will be set later in pro_pack */
1010 rc = ksocknal_launch_packet(ni, tx, target); 1015 rc = ksocknal_launch_packet(ni, tx, target);