Thread (20 messages) flat view 20 messages, 3 authors, 2012-06-17

[PATCH 1/3] net: lpc_eth: Replace WARN() trace with simple pr_warn()

From: Eric Dumazet <hidden>
Date: 2012-06-11 08:25:13
Also in: lkml, netdev

On Mon, 2012-06-11 at 10:03 +0200, Roland Stigge wrote:
quoted hunk ↗ jump to hunk
A WARN() trace indicating a "BUG!" was identified as a "normal" case in the
xmit function in case all TX descriptors are occupied already. In this case,
NETDEV_TX_BUSY is returned, nothing buggy at all.

Signed-off-by: Roland Stigge <redacted>
Tested-by: Alexandre Pereira da Silva <redacted>

---
 drivers/net/ethernet/nxp/lpc_eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.orig/drivers/net/ethernet/nxp/lpc_eth.c
+++ linux-2.6/drivers/net/ethernet/nxp/lpc_eth.c
@@ -1114,7 +1114,7 @@ static int lpc_eth_hard_start_xmit(struc
 		   buffers */
 		netif_stop_queue(ndev);
 		spin_unlock_irq(&pldat->lock);
-		WARN(1, "BUG! TX request when no free TX buffers!\n");
+		pr_warn("Note: TX request when no free TX buffers.\n");
 		return NETDEV_TX_BUSY;
 	}
 
Entering this path is a bug, don't hide it...

Please share with us how this bug was identified as a "normal case" ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help