From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbbJFM34 (ORCPT ); Tue, 6 Oct 2015 08:29:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:52581 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbbJFM3x convert rfc822-to-8bit (ORCPT ); Tue, 6 Oct 2015 08:29:53 -0400 From: Johannes Thumshirn To: Jiri Slaby Cc: akpm@linux-foundation.org, JBottomley@odin.com, kxie@chelsio.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Love , fcoe-devel@open-fcoe.org Subject: Re: [PATCH -resend 1/1] fcoe: use continue instead of goto+label Date: Tue, 06 Oct 2015 14:29:51 +0200 Message-ID: <2012401.0lbOR2Ajn3@c203> User-Agent: KMail/4.14.10 (Linux/4.1.6-3-desktop; KDE/4.14.10; x86_64; ; ) In-Reply-To: <1444134465-3693-1-git-send-email-jslaby@suse.cz> References: <1444134465-3693-1-git-send-email-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Robert Love > 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); Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumshirn@suse.de +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