mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 04:01:26 +00:00
Cleanup:
- Removed a spinlock that became superfluous. - Fixed checkpatch and sparse complaints. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -715,9 +715,9 @@ static enum srpt_command_state srpt_set_cmd_state(struct srpt_ioctx *ioctx,
|
||||
WARN_ON(!ioctx);
|
||||
WARN_ON(new == SRPT_STATE_NEW);
|
||||
|
||||
do
|
||||
do {
|
||||
previous = atomic_read(&ioctx->state);
|
||||
while (previous != SRPT_STATE_ABORTED
|
||||
} while (previous != SRPT_STATE_ABORTED
|
||||
&& atomic_cmpxchg(&ioctx->state, previous, new) != previous);
|
||||
|
||||
return previous;
|
||||
@@ -949,7 +949,7 @@ out:
|
||||
|
||||
static void srpt_reset_ioctx(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx)
|
||||
{
|
||||
srpt_unmap_sg_to_ib_sge(ch, ioctx);
|
||||
srpt_unmap_sg_to_ib_sge(ch, ioctx);
|
||||
|
||||
if (ioctx->n_rbuf > 1) {
|
||||
kfree(ioctx->rbufs);
|
||||
@@ -1650,7 +1650,7 @@ out:
|
||||
* a call to ib_destroy_cm_id(), which locks the cm_id spinlock and hence
|
||||
* waits until this function has finished).
|
||||
*/
|
||||
void srpt_release_channel_by_cmid(struct ib_cm_id *cm_id)
|
||||
static void srpt_release_channel_by_cmid(struct ib_cm_id *cm_id)
|
||||
{
|
||||
struct srpt_device *sdev;
|
||||
struct srpt_rdma_ch *ch;
|
||||
@@ -1867,7 +1867,6 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
|
||||
goto reject;
|
||||
}
|
||||
|
||||
spin_lock_init(&ch->spinlock);
|
||||
memcpy(ch->i_port_id, req->initiator_port_id, 16);
|
||||
memcpy(ch->t_port_id, req->target_port_id, 16);
|
||||
ch->sport = &sdev->port[param->port - 1];
|
||||
|
||||
@@ -169,7 +169,6 @@ struct srpt_rdma_ch {
|
||||
/* 128-bit target port identifier copied from SRP_LOGIN_REQ. */
|
||||
u8 t_port_id[16];
|
||||
atomic_t req_lim_delta;
|
||||
spinlock_t spinlock;
|
||||
atomic_t state; /*enum rdma_ch_state*/
|
||||
/* Node for insertion in the srpt_device::rch_list list. */
|
||||
struct list_head list;
|
||||
|
||||
Reference in New Issue
Block a user