[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240611.055708.569544695430930380.fujita.tomonori@gmail.com>
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