From: Joe Perches <joe@perches.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh_eth: coding style fixes
Date: Fri, 03 Jan 2014 06:28:59 -0800 [thread overview]
Message-ID: <1388759339.14334.10.camel@joe-AO722> (raw)
In-Reply-To: <52C6886D.2000801@cogentembedded.com>
On Fri, 2014-01-03 at 13:52 +0400, Sergei Shtylyov wrote:
> On 03-01-2014 5:42, Joe Perches wrote:
> >>> @@ -1952,8 +1949,8 @@ static void sh_eth_tx_timeout(struct net
> >>> netif_stop_queue(ndev);
> >>>
> >>> if (netif_msg_timer(mdp))
> >>> - dev_err(&ndev->dev, "%s: transmit timed out, status %8.8x,"
> >>> - " resetting...\n", ndev->name, (int)sh_eth_read(ndev, EESR));
> >>> + dev_err(&ndev->dev, "%s: transmit timed out, status %8.8x, resetting...\n"
> >>> + ndev->name, (int)sh_eth_read(ndev, EESR));
> >>>
> >>> /* tx_errors count up */
> >>> ndev->stats.tx_errors++;
>
> >> You did not build test this.
>
> >> drivers/net/ethernet/renesas/sh_eth.c: In function ‘sh_eth_tx_timeout’:
> >> drivers/net/ethernet/renesas/sh_eth.c:1953:4: error: expected ‘)’ before ‘ndev’
>
> > Also, this would likely be better as:
> >
> > netif_err(mdp, timer, ndev, "transmit timed out, status %#08lx, resetting...\n",
> > sh_eth_read(ndev, EESR));
>
> If checkpoint.pl did point this out, I would have fixed it.
That's not really possible to do via checkpatch.
checkpatch is neither a compiler nor a programmer.
There are _many_ patterns that a person (or maybe
spatch) might spot that checkpatch could not.
checkpatch is a brainless scanner and please use
yours over any advice given by checkpatch.
> Since it doesn't, it's probably material of another patch.
All of the dev_<level> uses in this file/module
should be inspected and possibly converted to
netdev_<level> or netif_<level>. This could change
and improve the output message logging.
next prev parent reply other threads:[~2014-01-03 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 0:25 [PATCH] sh_eth: coding style fixes Sergei Shtylyov
2014-01-03 0:34 ` David Miller
2014-01-03 1:42 ` Joe Perches
2014-01-03 9:52 ` Sergei Shtylyov
2014-01-03 14:28 ` Joe Perches [this message]
2014-01-03 9:50 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388759339.14334.10.camel@joe-AO722 \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=linux-sh@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox