summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/selftest/selftest.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-12-18 12:25:19 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-08 16:03:44 +0100
commit19ae89d32503493315dec77919815d3add851389 (patch)
tree188befc0d1730df340b0010573e472590beae9c4 /drivers/staging/lustre/lnet/selftest/selftest.h
parent0aa211e39857f17e24126c47f6e3fe3b971344b3 (diff)
staging: lustre: libcfs: remove wi_data from cfs_workitem
In every case, the value passed via wi_data can be determined from the cfs_workitem pointer using container_of(). So use container_of(), and discard wi_data. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest/selftest.h')
-rw-r--r--drivers/staging/lustre/lnet/selftest/selftest.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h
index 8c10f0f149d5..929a1c3eb290 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -476,13 +476,13 @@ swi_wi_action(struct cfs_workitem *wi)
}
static inline void
-swi_init_workitem(struct swi_workitem *swi, void *data,
+swi_init_workitem(struct swi_workitem *swi,
swi_action_t action, struct cfs_wi_sched *sched)
{
swi->swi_sched = sched;
swi->swi_action = action;
swi->swi_state = SWI_STATE_NEWBORN;
- cfs_wi_init(&swi->swi_workitem, data, swi_wi_action);
+ cfs_wi_init(&swi->swi_workitem, swi_wi_action);
}
static inline void
@@ -533,7 +533,7 @@ srpc_init_client_rpc(struct srpc_client_rpc *rpc, struct lnet_process_id peer,
crpc_bulk.bk_iovs[nbulkiov]));
INIT_LIST_HEAD(&rpc->crpc_list);
- swi_init_workitem(&rpc->crpc_wi, rpc, srpc_send_rpc,
+ swi_init_workitem(&rpc->crpc_wi, srpc_send_rpc,
lst_sched_test[lnet_cpt_of_nid(peer.nid)]);
spin_lock_init(&rpc->crpc_lock);
atomic_set(&rpc->crpc_refcount, 1); /* 1 ref for caller */