* [PATCH -resend 1/1] fcoe: use continue instead of goto+label
@ 2015-10-06 12:27 Jiri Slaby
[not found] ` <1444134465-3693-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2015-10-06 12:27 UTC (permalink / raw)
To: akpm
Cc: JBottomley, kxie, linux-scsi, linux-kernel, Jiri Slaby,
Robert Love, fcoe-devel
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
---
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);
--
2.6.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1444134465-3693-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>]
* Re: [PATCH -resend 1/1] fcoe: use continue instead of goto+label [not found] ` <1444134465-3693-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org> @ 2015-10-06 12:29 ` Johannes Thumshirn 2015-10-06 22:34 ` Vasu Dev 1 sibling, 0 replies; 3+ messages in thread From: Johannes Thumshirn @ 2015-10-06 12:29 UTC (permalink / raw) To: Jiri Slaby Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, JBottomley-wo1vFcy6AUs, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kxie-ut6Up61K2wZBDgjK7y7TUQ, fcoe-devel-s9riP+hp16TNLxjTenLetw, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b 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-AlSwsSmVLrQ@public.gmane.org> > Cc: Robert Love <robert.w.love-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: fcoe-devel-s9riP+hp16TNLxjTenLetw@public.gmane.org > --- > 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-l3A5Bk7waGM@public.gmane.org> -- Johannes Thumshirn Storage jthumshirn-l3A5Bk7waGM@public.gmane.org +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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -resend 1/1] fcoe: use continue instead of goto+label [not found] ` <1444134465-3693-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org> 2015-10-06 12:29 ` Johannes Thumshirn @ 2015-10-06 22:34 ` Vasu Dev 1 sibling, 0 replies; 3+ messages in thread From: Vasu Dev @ 2015-10-06 22:34 UTC (permalink / raw) To: Jiri Slaby Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, JBottomley-O3H1v1f1dlM, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kxie-ut6Up61K2wZBDgjK7y7TUQ, fcoe-devel-s9riP+hp16TNLxjTenLetw, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b On Tue, 2015-10-06 at 14:27 +0200, 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-AlSwsSmVLrQ@public.gmane.org> > Cc: Robert Love <robert.w.love-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: fcoe-devel-s9riP+hp16TNLxjTenLetw@public.gmane.org > --- > 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); Acked-by: Vasu Dev <vasu.dev-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-06 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 12:27 [PATCH -resend 1/1] fcoe: use continue instead of goto+label Jiri Slaby
[not found] ` <1444134465-3693-1-git-send-email-jslaby-AlSwsSmVLrQ@public.gmane.org>
2015-10-06 12:29 ` Johannes Thumshirn
2015-10-06 22:34 ` Vasu Dev
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox