lkml.org 
[lkml]   [2015]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] fcoe: use continue instead of goto+label
Date
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@suse.cz>
Cc: Robert Love <robert.w.love@intel.com>
Cc: fcoe-devel@open-fcoe.org
---
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 ec193a8357d7..179d0ff5562f 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);
--
2.3.5


\
 
 \ /
  Last update: 2015-05-05 15:21    [W:0.032 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site