From patchwork Mon May 11 14:05:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 470850 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0E0F914018C for ; Tue, 12 May 2015 00:05:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754033AbbEKOFL (ORCPT ); Mon, 11 May 2015 10:05:11 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:36458 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752555AbbEKOFJ (ORCPT ); Mon, 11 May 2015 10:05:09 -0400 Received: by wizk4 with SMTP id k4so107026778wiz.1 for ; Mon, 11 May 2015 07:05:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=LXxdeSt825Y5+Ox5q5b5aRL7lzWktWd6XIi4RPFCZhY=; b=g9maxCFEt7QNe/MNokYBoaG1+yA0TwhcjFG+gqLugIJCa+qHD/g7ckc032YZDCasgY IkIx2iVrs0tY9Fb4hBZoBnFSd0EDUeE/hF7x0ntP2BES3k2HlNsDml6R3OiFg7cjAGmC sWiM8aujrqN/ibOtiZ8hIHbfyZHHWk7Wh35Nl5/reWSuAD1gMXhWyOPW0vBcOjQfeurb 6YuLAcYBuetJhJHUqnbSq889Ta7H+SaHWIQrHH64B0YGv9N4vQlenGNUr++TdMh6gRVW P6w617ONYbRIZ84IY7I4pN7V9fIGUGkAkZZExYAjNuWGWsCjfxpy6ILUbpegPydnwGra z4FA== X-Gm-Message-State: ALoCoQl/iaqrQhnacW++LgF87Y5YRyHo6XW6YKmmuGAmA7l2XWXSCWGAu9LdWqQmHIDw/scYmNsZ X-Received: by 10.180.74.208 with SMTP id w16mr19828014wiv.31.1431353108464; Mon, 11 May 2015 07:05:08 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by mx.google.com with ESMTPSA id 16sm23005055wjs.41.2015.05.11.07.05.07 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 11 May 2015 07:05:07 -0700 (PDT) From: Michal Simek To: netdev@vger.kernel.org Cc: =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , monstr@monstr.eu, Fabian Frederick , linux-kernel@vger.kernel.org, "David S. Miller" , =?UTF-8?q?Manuel=20Sch=C3=B6lling?= , Julia Lawall , Markus Elfring , Subbaraya Sundeep Bhatta , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] net: ll_temac: Use one return statement instead of two Date: Mon, 11 May 2015 16:05:02 +0200 Message-Id: <3a0fa74dd703db5dac4816ef15b6a512ef0f2ec0.1431353091.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.3.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use one return statement instead of two to simplify the code. Both are returning the same value. Signed-off-by: Michal Simek --- Changes in v2: - Use the same SoB as sender address - Reported-by: Julia Lawall drivers/net/ethernet/xilinx/ll_temac_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 062483f334a5..cfb6bdb37fdc 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -688,10 +688,8 @@ static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) cur_p = &lp->tx_bd_v[lp->tx_bd_tail]; if (temac_check_tx_bd_space(lp, num_frag)) { - if (!netif_queue_stopped(ndev)) { + if (!netif_queue_stopped(ndev)) netif_stop_queue(ndev); - return NETDEV_TX_BUSY; - } return NETDEV_TX_BUSY; }