Skip to content

Commit

Permalink
Staging: hv: moved assignments out of if conditions
Browse files Browse the repository at this point in the history
Moved all assignments in if conditions to the preceeding line

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Timo von Holtz authored and Greg Kroah-Hartman committed Feb 9, 2011
1 parent 3c4a941 commit 581de3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 581de3b

Please sign in to comment.