Re: [PATCH -resend 1/1] fcoe: use continue instead of goto+label

From: Johannes Thumshirn
Date: Tue Oct 06 2015 - 08:29:58 EST


On Tuesday 06 October 2015 14:27:45 Jiri Slaby wrote:
> There is a label pointing to the start of a while loop and a goto
> nested only in the loop. The goto jumps to the label in some cases.
> Replace the goto and the label by simple continue.
>
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Robert Love <robert.w.love@xxxxxxxxx>
> Cc: fcoe-devel@xxxxxxxxxxxxx
> ---
> Sent on:
> May 5
>
> drivers/scsi/fcoe/fcoe.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
> index d3eb80c46bbe..d187ba9b361d 100644
> --- a/drivers/scsi/fcoe/fcoe.c
> +++ b/drivers/scsi/fcoe/fcoe.c
> @@ -1873,7 +1873,6 @@ static int fcoe_percpu_receive_thread(void *arg)
>
> set_user_nice(current, MIN_NICE);
>
> -retry:
> while (!kthread_should_stop()) {
>
> spin_lock_bh(&p->fcoe_rx_list.lock);
> @@ -1883,7 +1882,7 @@ retry:
> set_current_state(TASK_INTERRUPTIBLE);
> spin_unlock_bh(&p->fcoe_rx_list.lock);
> schedule();
> - goto retry;
> + continue;
> }
>
> spin_unlock_bh(&p->fcoe_rx_list.lock);

Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

--
Johannes Thumshirn Storage
jthumshirn@xxxxxxx +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/