From patchwork Fri Jan 10 23:41:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3468421 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E76E9F169 for ; Fri, 10 Jan 2014 22:41:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4DFA2014A for ; Fri, 10 Jan 2014 22:41:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7DC22013D for ; Fri, 10 Jan 2014 22:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753722AbaAJWlr (ORCPT ); Fri, 10 Jan 2014 17:41:47 -0500 Received: from mail-la0-f54.google.com ([209.85.215.54]:41176 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbaAJWlq (ORCPT ); Fri, 10 Jan 2014 17:41:46 -0500 Received: by mail-la0-f54.google.com with SMTP id er20so2003137lab.27 for ; Fri, 10 Jan 2014 14:41:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=t8W06vue4SD+VuD8HH0DGQAEKJGVwHxM77Zqnq0J8ns=; b=FPDrgA9tzd2Ow6i5UjGc0aFiKfDGhO9hVn10MxWE5XQIP0iuC3EQTrmQ8ebq7JiM91 WuT8Trl5ni+HHUmK0MwesRStQqgnuxMKftMU7yiPFyrfpQOCqsfpyS8zRFdjU2krgOye qYby/7JJXlUp9yQyHtzyHAbIjtFTzSt6BMUyYEGAdLo0kC3zROh6sAZJs7Vq88lrrWhl NxxiWaDg/a/iecEuQWwXU4FR1jeYcMtE0/YPxkCTNRXmAAc4zvSW9A9aDwN18nG4noNr 2ml+MON/zRZa0hr5jdotbVR8jsGkxGRoBcieT+0rAGhmDSjOxTKVcQ+ETIzrJ9bZ4y8p N06A== X-Gm-Message-State: ALoCoQn7Si3udkMgt+ibsNmmy9v9gDoQHaxdIVdU2lv8uvvaHBGMHticFq6g9kzaNPT2YGX6P+RL X-Received: by 10.152.180.228 with SMTP id dr4mr4894043lac.32.1389393705192; Fri, 10 Jan 2014 14:41:45 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp91-76-80-155.pppoe.mtu-net.ru. [91.76.80.155]) by mx.google.com with ESMTPSA id z3sm5332395lag.10.2014.01.10.14.41.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 10 Jan 2014 14:41:44 -0800 (PST) To: netdev@vger.kernel.org Subject: [PATCH] sh_eth: fix garbled TX error message Cc: linux-sh@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 11 Jan 2014 02:41:49 +0300 MIME-Version: 1.0 Message-Id: <201401110241.49471.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Simon Horman --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);