From: Jaime Arrocha <jarr@xxxxxxxxxxxxxx> Replaced deprecated goto statements. Signed-off-by: Jaime Arrocha <jarr@xxxxxxxxxxxxxx> --- drivers/staging/slicoss/slicoss.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index ac126d4..cc45f4c 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1457,30 +1457,30 @@ static struct slic_hostcmd *slic_cmdq_getfree(struct adapter *adapter) struct slic_hostcmd *cmd = NULL; unsigned long flags; -lock_and_retry: spin_lock_irqsave(&cmdq->lock, flags); -retry: cmd = cmdq->head; - if (cmd) { - cmdq->head = cmd->next; - cmdq->count--; - spin_unlock_irqrestore(&cmdq->lock, flags); - } else { + while (!cmd) { slic_cmdq_getdone(adapter); cmd = cmdq->head; - if (cmd) { - goto retry; - } else { + if (cmd) + continue; + else { u32 *pageaddr; spin_unlock_irqrestore(&cmdq->lock, flags); pageaddr = slic_cmdqmem_addpage(adapter); if (pageaddr) { slic_cmdq_addcmdpage(adapter, pageaddr); - goto lock_and_retry; + spin_lock_irqsave(&cmdq->lock, flags); + cmd = cmdq->head; + continue; } + return cmd; } } + cmdq->head = cmd->next; + cmdq->count--; + spin_unlock_irqrestore(&cmdq->lock, flags); return cmd; } -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel