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: Tue, 11 Jun 2024 05:57:08 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: andrew@...n.ch
Cc: fujita.tomonori@...il.com, linux@...linux.org.uk,
 netdev@...r.kernel.org, horms@...nel.org, kuba@...nel.org,
 jiri@...nulli.us, pabeni@...hat.com, hfdevel@....net, naveenm@...vell.com,
 jdamato@...tly.com
Subject: Re: [PATCH net-next v9 6/6] net: tn40xx: add phylink support

On Mon, 10 Jun 2024 17:42:30 +0200
Andrew Lunn <andrew@...n.ch> wrote:

>> > And my email client, setup with rules to catch common programming
>> > mistakes, highlights the above line. I have no idea why people do
>> > this... why people think "lets return -1 on error". It seems to be
>> > a very common pattern... but it's utterly wrong. -1 is -EPERM, aka
>> > "Operation not permitted". This is not what you mean here. Please
>> > return a more suitable negative errno symbol... and please refrain
>> > from using "return -1" in kernel code.
>> 
>> Indeed, my bad. How about -ENODEV? Or -ENOXIO?
> 
> ENODEV.

Thanks for the confirmation.

There are drivers that return -ENOXIO in the same situation so I was
not sure which should be used.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ