lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 04 Feb 2016 21:42:22 +0100
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: davicom: fix devicetree irq resource

Sergei Shtylyov <sergei.shtylyov@...entembedded.com> writes:

> Hello.
>
>    Your patch summary prefixes are too verbose, it was enough to say only
> "dm9000: ".
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.

>> -	/* 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 ?
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
 */

I was reusing the previous comment style, but I will change it for the standard
kernel style if you wish.

>>
>> +	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. :-(
Ah we had that discussion not very long ago, didn't we ? :)
And I think I'll reuse the "if (ndev->irq < 0) {" solution to be consistent with
myself.

Thanks for the review.

-- 
Robert

Powered by blists - more mailing lists