netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]Fix misplaces parenthesis in virtio_net.c
@ 2012-04-09 15:14 Torsten Kaiser
  2012-04-13 15:05 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Torsten Kaiser @ 2012-04-09 15:14 UTC (permalink / raw)
  To: David Miller, Rick Jones; +Cc: netdev, linux-kernel

Commit 2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 misplaced its
parenthesis and now tx_fifo_errors will only be incremented if an
ENOMEM error is not written to the syslog.

Correct the parenthesis and indentation to the original goal of
counting all non ENOMEM errors and ratelimiting only the messages.

Signed-of-by: Torsten Kaiser <just.for.lkml@googlemail.com>

--- a/drivers/net/virtio_net.c	2012-04-09 16:55:31.366847092 +0200
+++ b/drivers/net/virtio_net.c	2012-04-09 16:56:31.196847799 +0200
@@ -626,16 +626,15 @@
 	/* This can happen with OOM and indirect buffers. */
 	if (unlikely(capacity < 0)) {
 		if (likely(capacity == -ENOMEM)) {
-			if (net_ratelimit()) {
+			if (net_ratelimit())
 				dev_warn(&dev->dev,
 					 "TX queue failure: out of memory\n");
-			} else {
+		} else {
 			dev->stats.tx_fifo_errors++;
 			if (net_ratelimit())
 				dev_warn(&dev->dev,
 					 "Unexpected TX queue failure: %d\n",
 					 capacity);
-			}
 		}
 		dev->stats.tx_dropped++;
 		kfree_skb(skb);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]Fix misplaces parenthesis in virtio_net.c
  2012-04-09 15:14 [PATCH]Fix misplaces parenthesis in virtio_net.c Torsten Kaiser
@ 2012-04-13 15:05 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-13 15:05 UTC (permalink / raw)
  To: just.for.lkml; +Cc: rick.jones2, netdev, linux-kernel

From: Torsten Kaiser <just.for.lkml@googlemail.com>
Date: Mon, 9 Apr 2012 17:14:15 +0200

> Commit 2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 misplaced its
> parenthesis and now tx_fifo_errors will only be incremented if an
> ENOMEM error is not written to the syslog.
> 
> Correct the parenthesis and indentation to the original goal of
> counting all non ENOMEM errors and ratelimiting only the messages.
> 
> Signed-of-by: Torsten Kaiser <just.for.lkml@googlemail.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-13 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 15:14 [PATCH]Fix misplaces parenthesis in virtio_net.c Torsten Kaiser
2012-04-13 15:05 ` David Miller

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).