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: 6377541 Return-Path: X-Original-To: patchwork-linux-arm@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 309669F374 for ; Mon, 11 May 2015 14:08:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A4C420639 for ; Mon, 11 May 2015 14:08:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86A3E20638 for ; Mon, 11 May 2015 14:08:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YroKw-0007ej-Lz; Mon, 11 May 2015 14:05:38 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YroKq-0007A4-8h for linux-arm-kernel@lists.infradead.org; Mon, 11 May 2015 14:05:32 +0000 Received: by wief7 with SMTP id f7so87117552wie.0 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=KSiU0r2QZuzSnRVcCHCCkhLmLJHOSQUk8hCHGHXQrMCH+Fr8BJWnRBiXaR+w+muvYv Dir3pHauoZSHCNv76wOvp8rxD/Ur2Pbtwn1kxEO4MnmcEXFhdrjFoaVOyYI2i7B0MATk Z0X91uenIi5DHczC+jKKOEXv1qkLgypAD3LHDHvSDI7PLGi8cgJMg62oa4JOh9coMCLI jpqG6NyQtzdp2cCG9fvWXxk6CPJZioimNojDG4N3if2MDnIRipertLsPrFto8318vSYe yNnRk30D1c0HrCX8lSPW81ZNR7mAc8fB1ifCOA6M4RTgoE4b7saFt1MtNGbnpybKKzIw JIXw== X-Gm-Message-State: ALoCoQlA2YZQ7+Sp+9VvSiSX023Fsoxx9pgOLEakTGSB17C5NGc+66B3oYDOnygA0PXJYhzpdjTb 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150511_070532_484281_6E8DEEA2 X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Subbaraya Sundeep Bhatta , monstr@monstr.eu, linux-kernel@vger.kernel.org, Markus Elfring , Fabian Frederick , Julia Lawall , =?UTF-8?q?Manuel=20Sch=C3=B6lling?= , "David S. Miller" , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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; }