Skip to content

Commit

Permalink
RDMA/siw: Remove set but not used variables 'rv'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/sw/siw/siw_cm.c: In function siw_cep_set_inuse:
drivers/infiniband/sw/siw/siw_cm.c:223:6: warning: variable rv set but not used [-Wunused-but-set-variable]

Fixes: 6c52fdc ("rdma/siw: connection management")
Link: https://lore.kernel.org/r/20190719012938.100628-1-maowenan@huawei.com
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Reviewed-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Mao Wenan authored and Jason Gunthorpe committed Jul 22, 2019
1 parent b7f406b commit af0653d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/sw/siw/siw_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,12 @@ static void siw_put_work(struct siw_cm_work *work)
static void siw_cep_set_inuse(struct siw_cep *cep)
{
unsigned long flags;
int rv;
retry:
spin_lock_irqsave(&cep->lock, flags);

if (cep->in_use) {
spin_unlock_irqrestore(&cep->lock, flags);
rv = wait_event_interruptible(cep->waitq, !cep->in_use);
wait_event_interruptible(cep->waitq, !cep->in_use);
if (signal_pending(current))
flush_signals(current);
goto retry;
Expand Down

0 comments on commit af0653d

Please sign in to comment.