netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh_eth: fix garbled TX error message
@ 2014-01-10 23:41 Sergei Shtylyov
  2014-01-13  0:45 ` Simon Horman
  2014-01-14  7:29 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2014-01-10 23:41 UTC (permalink / raw)
  To: netdev; +Cc: linux-sh

sh_eth_error() in case of a TX error tries to print a message using 2 dev_err()
calls with the first string not finished by '\n', so that the resulting message
would inevitably come out garbled, with something like "3net eth0: " inserted
in the middle.  Avoid that by merging 2 calls into one.

While at it, insert an empty line after the nearby declaration.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Although being a fix, this patch is against the 'net-next.git' repo as it's does
not seem important enough at this time in the release cycle. Please consider it
for the stable kernel though...

 drivers/net/ethernet/renesas/sh_eth.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -1513,11 +1513,11 @@ ignore_link:
 	if (intr_status & mask) {
 		/* Tx error */
 		u32 edtrr = sh_eth_read(ndev, EDTRR);
+
 		/* dmesg */
-		dev_err(&ndev->dev, "TX error. status=%8.8x cur_tx=%8.8x ",
-			intr_status, mdp->cur_tx);
-		dev_err(&ndev->dev, "dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n",
-			mdp->dirty_tx, (u32) ndev->state, edtrr);
+		dev_err(&ndev->dev, "TX error. status=%8.8x cur_tx=%8.8x dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n",
+			intr_status, mdp->cur_tx, mdp->dirty_tx,
+			(u32)ndev->state, edtrr);
 		/* dirty buffer free */
 		sh_eth_txfree(ndev);
 

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

end of thread, other threads:[~2014-01-14 11:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-10 23:41 [PATCH] sh_eth: fix garbled TX error message Sergei Shtylyov
2014-01-13  0:45 ` Simon Horman
2014-01-13  1:24   ` Joe Perches
2014-01-13 16:15     ` Sergei Shtylyov
2014-01-13 16:51       ` Joe Perches
2014-01-14  7:29 ` David Miller
2014-01-14 11:49   ` Sergei Shtylyov

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