From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: davicom: fix devicetree irq resource
Date: Thu, 4 Feb 2016 23:56:38 +0300 [thread overview]
Message-ID: <56B3BB06.9010506@cogentembedded.com> (raw)
In-Reply-To: <87d1sc5hsh.fsf@belgarion.home>
On 02/04/2016 11:42 PM, Robert Jarzmik wrote:
>> Your patch summary prefixes are too verbose, it was enough to say only
>> "dm9000: ".
Or "davicom: dm9000: ". Missing the driver name itself doesn't look very
consistent. :-)
> Well, I don't agree here. The subsystem should be fully specified, at least this
> is something I require in pxa, something that is also required in sound/*, etc
> ... If David doesn't object, I'll keep it that way. As it's his tree, his
> decision in the end, so let's have him decide.
I expect that he disagrees with you. Let's wait...
>>> - /* If there is no IRQ type specified, default to something that
>>> - * may work, and tell the user that this is a problem */
>>> -
>>> - if (irqflags == IRQF_TRIGGER_NONE)
>>> - irqflags = irq_get_trigger_type(dev->irq);
>>> -
>>> - if (irqflags == IRQF_TRIGGER_NONE)
>>> + /* If there is no IRQ type specified, tell the user that this is a
>>> + * problem */
>>
>> The networking code formats comments this way:
>>
>> /* foo
>> * bar
>> */
> May I know where this is documented ?
Documentation/CodingStyle, chapter 8. Have you run your patch thru
scripts/checkpatch.pl?
> I'm asking because I didn't find it, because I parsed drivers/net/*.c files, and
> the standard kernel comment style was there, ie:
> /*
> * foo
> * bar
> */
But you didn't follow it as well?
> I was reusing the previous comment style,
Ah...
> but I will change it for the standard
> kernel style if you wish.
Yes, I think checkpatch.pl checks for that, --strict is forced for the
networking code.
>>> + ndev->irq = platform_get_irq(pdev, 0);
>>> + if (ndev->irq <= 0) {
>>
>> I don't recommend checking for 0 and returning early in this case --
>> you'll signal a probe success this way. Either ignore 0 or return -E<smth>
>> in this case. Unfortunately, platform_get_irq() is so sloppily coded now that it
>> *can* return 0 on error. :-(
I'll try looking into this issue once I get more free time...
> Ah we had that discussion not very long ago, didn't we ? :)
Yeah, I remembered that just after hitting <Send>. :-)
> And I think I'll reuse the "if (ndev->irq < 0) {" solution to be consistent with
> myself.
> Thanks for the review.
My pleasure. :-)
MBR, Sergei
prev parent reply other threads:[~2016-02-04 20:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 21:40 [PATCH] net: ethernet: davicom: fix devicetree irq resource Robert Jarzmik
2016-02-04 17:16 ` Sergei Shtylyov
2016-02-04 20:42 ` Robert Jarzmik
2016-02-04 20:56 ` Sergei Shtylyov [this message]
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=56B3BB06.9010506@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.