sh_eth: fix garbled TX error message
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 10 Jan 2014 23:41:49 +0000 (02:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jan 2014 07:28:48 +0000 (23:28 -0800)
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>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index 888410737dbdc5270774efb57e3196f35814b901..ba1f6c928b9127819b2a1bdaf26ea385bcfb74e8 100644 (file)
@@ -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);