From patchwork Tue May 5 12:56:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 6337911 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BCC59F1C2 for ; Tue, 5 May 2015 12:56:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDFE520274 for ; Tue, 5 May 2015 12:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA74620270 for ; Tue, 5 May 2015 12:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423084AbbEEM4v (ORCPT ); Tue, 5 May 2015 08:56:51 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:57450 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1423065AbbEEM4r (ORCPT ); Tue, 5 May 2015 08:56:47 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YpcOu-00053d-2O; Tue, 05 May 2015 14:56:40 +0200 From: Jiri Slaby To: robert.w.love@intel.com Cc: JBottomley@odin.com, linux-scsi@vger.kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Jiri Slaby , fcoe-devel@open-fcoe.org Subject: [PATCH 1/1] fcoe: use continue instead of goto+label Date: Tue, 5 May 2015 14:56:39 +0200 Message-Id: <1430830599-19406-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);