Skip to content

Commit

Permalink
ib_srpt: Remove set-but-not-used variables
Browse files Browse the repository at this point in the history
Detected these variables by building with W=1.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Bart Van Assche authored and Nicholas Bellinger committed May 31, 2015
1 parent 649ee05 commit 2fe6e72
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,15 +1387,13 @@ static void srpt_handle_send_err_comp(struct srpt_rdma_ch *ch, u64 wr_id)
{
struct srpt_send_ioctx *ioctx;
enum srpt_command_state state;
struct se_cmd *cmd;
u32 index;

atomic_inc(&ch->sq_wr_avail);

index = idx_from_wr_id(wr_id);
ioctx = ch->ioctx_ring[index];
state = srpt_get_cmd_state(ioctx);
cmd = &ioctx->cmd;

WARN_ON(state != SRPT_STATE_CMD_RSP_SENT
&& state != SRPT_STATE_MGMT_RSP_SENT
Expand Down Expand Up @@ -1472,10 +1470,8 @@ static void srpt_handle_rdma_err_comp(struct srpt_rdma_ch *ch,
struct srpt_send_ioctx *ioctx,
enum srpt_opcode opcode)
{
struct se_cmd *cmd;
enum srpt_command_state state;

cmd = &ioctx->cmd;
state = srpt_get_cmd_state(ioctx);
switch (opcode) {
case SRPT_RDMA_READ_LAST:
Expand Down Expand Up @@ -2176,12 +2172,9 @@ static void srpt_destroy_ch_ib(struct srpt_rdma_ch *ch)
*/
static void __srpt_close_ch(struct srpt_rdma_ch *ch)
{
struct srpt_device *sdev;
enum rdma_ch_state prev_state;
unsigned long flags;

sdev = ch->sport->sdev;

spin_lock_irqsave(&ch->spinlock, flags);
prev_state = ch->state;
switch (prev_state) {
Expand Down

0 comments on commit 2fe6e72

Please sign in to comment.