diff options
author | James Simmons <jsimmons@infradead.org> | 2016-11-17 14:35:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-18 08:47:32 +0100 |
commit | eb280ab7899eb9a66eae46efce64940d36c1b161 (patch) | |
tree | 8aa0c210ad0d60d3129c10fc5d8ef5b6efa40818 /drivers/staging/lustre/lnet/lnet/router.c | |
parent | 515c1750975518a01ea23aba1af6407e58c84e85 (diff) | |
download | linux-0-day-eb280ab7899eb9a66eae46efce64940d36c1b161.tar.gz linux-0-day-eb280ab7899eb9a66eae46efce64940d36c1b161.tar.xz |
staging: lustre: lnet: fill in real lnet_md_t
While checkpatch reported an alignment issue
its just ugly to fill in a data structure being
passed to a function. Instead fill in a lnet_md_t
on the stack and pass that to LNetMDBind.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/router.c')
-rw-r--r-- | drivers/staging/lustre/lnet/lnet/router.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c index 063ad55ec9500..8afa0abf15cd4 100644 --- a/drivers/staging/lustre/lnet/lnet/router.c +++ b/drivers/staging/lustre/lnet/lnet/router.c @@ -903,6 +903,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway) { lnet_rc_data_t *rcd = NULL; lnet_ping_info_t *pi; + lnet_md_t md; int rc; int i; @@ -925,15 +926,15 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway) } rcd->rcd_pinginfo = pi; + md.start = pi; + md.user_ptr = rcd; + md.length = LNET_PINGINFO_SIZE; + md.threshold = LNET_MD_THRESH_INF; + md.options = LNET_MD_TRUNCATE; + md.eq_handle = the_lnet.ln_rc_eqh; + LASSERT(!LNetHandleIsInvalid(the_lnet.ln_rc_eqh)); - rc = LNetMDBind((lnet_md_t){.start = pi, - .user_ptr = rcd, - .length = LNET_PINGINFO_SIZE, - .threshold = LNET_MD_THRESH_INF, - .options = LNET_MD_TRUNCATE, - .eq_handle = the_lnet.ln_rc_eqh}, - LNET_UNLINK, - &rcd->rcd_mdh); + rc = LNetMDBind(md, LNET_UNLINK, &rcd->rcd_mdh); if (rc < 0) { CERROR("Can't bind MD: %d\n", rc); goto out; |