From: Timo von Holtz Date: Tue, 8 Feb 2011 14:55:49 +0000 (+0100) Subject: Staging: hv: moved assignments out of if conditions X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=581de3b0a538aa18181602008aa222f51dcf1ec3;p=mv-sheeva.git Staging: hv: moved assignments out of if conditions Moved all assignments in if conditions to the preceeding line Signed-off-by: Timo von Holtz Cc: Haiyang Zhang Cc: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 95fa810255e..6b8fd0c2b0d 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 */