Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754483Ab1BHOxB (ORCPT ); Tue, 8 Feb 2011 09:53:01 -0500 Received: from miraculix-out.informatik.uni-kiel.de ([134.245.248.209]:53608 "EHLO miraculix.informatik.uni-kiel.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753989Ab1BHOxA (ORCPT ); Tue, 8 Feb 2011 09:53:00 -0500 From: Timo von Holtz To: gregkh@suse.de Cc: hjanssen@microsoft.com, haiyangz@microsoft.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Timo von Holtz , Timo von Holtz Subject: [PATCH 2/2] Staging: hv: moved assigngents out of if conditions Date: Tue, 8 Feb 2011 15:52:22 +0100 Message-Id: <1297176742-9329-2-git-send-email-tvh@informatik.uni-kiel.de> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1297176742-9329-1-git-send-email-tvh@informatik.uni-kiel.de> References: <1297176742-9329-1-git-send-email-tvh@informatik.uni-kiel.de> X-Null-Tag: c45171bdbbb79cc6960749727bec5b6e X-Authenticated-Sender: user tvh from 86.103.149.108 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 39 Moved all assignments in if conditions to the preceeding line Signed-off-by: Timo von Holtz --- drivers/staging/hv/netvsc_drv.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 95fa810..6b8fd0c 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -126,7 +126,8 @@ static void netvsc_xmit_completion(void *context) dev_kfree_skb_any(skb); - if ((net_device_ctx->avail += num_pages) >= PACKET_PAGES_HIWATER) + net_device_ctx->avail += num_pages; + if (net_device_ctx->avail >= PACKET_PAGES_HIWATER) netif_wake_queue(net); } } @@ -207,7 +208,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) net->stats.tx_packets, net->stats.tx_bytes); - if ((net_device_ctx->avail -= num_pages) < PACKET_PAGES_LOWATER) + net_device_ctx->avail -= num_pages; + if (net_device_ctx->avail < PACKET_PAGES_LOWATER) netif_stop_queue(net); } else { /* we are shutting down or bus overloaded, just drop packet */ -- 1.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/