* [PATCH 2/2] Staging: hv: moved assigngents out of if conditions
2011-02-08 14:52 [PATCH 1/2] Staging: hv: replaced __attribute((packed)) with __packed Timo von Holtz
@ 2011-02-08 14:52 ` Timo von Holtz
0 siblings, 0 replies; 2+ messages in thread
From: Timo von Holtz @ 2011-02-08 14:52 UTC (permalink / raw)
To: gregkh
Cc: hjanssen, haiyangz, devel, linux-kernel, Timo von Holtz,
Timo von Holtz
Moved all assignments in if conditions to the preceeding line
Signed-off-by: Timo von Holtz <tvh@infomatik.uni-kiel.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] Staging: hv: moved assigngents out of if conditions
@ 2011-02-08 14:55 Timo von Holtz
0 siblings, 0 replies; 2+ messages in thread
From: Timo von Holtz @ 2011-02-08 14:55 UTC (permalink / raw)
To: gregkh; +Cc: hjanssen, haiyangz, devel, linux-kernel, Timo von Holtz
Moved all assignments in if conditions to the preceeding line
Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-08 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 14:55 [PATCH 2/2] Staging: hv: moved assigngents out of if conditions Timo von Holtz
-- strict thread matches above, loose matches on Subject: below --
2011-02-08 14:52 [PATCH 1/2] Staging: hv: replaced __attribute((packed)) with __packed Timo von Holtz
2011-02-08 14:52 ` [PATCH 2/2] Staging: hv: moved assigngents out of if conditions Timo von Holtz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).