Re: [PATCH net-next] checkpatch: warn about uses of ENOTSUPP

From
Jakub Kicinski <kuba@kernel.org>
Date
2020-05-10 19:26:38
Reply to
Andrew Lunn, 2020-05-10
On Sun, 10 May 2020 21:04:32 +0200 Andrew Lunn wrote:
On Sun, May 10, 2020 at 11:51:48AM -0700, Jakub Kicinski wrote:
quoted
ENOTSUPP often feels like the right error code to use, but it's
in fact not a standard Unix error. E.g.:  
Hi Jakub

You said ENOTSUPP is for NFS? Would it make sense to special case
fs/nfs* files and not warn there? I assume that would reduce the number
of false positives?
That's what Ben Hutchings once said, but I have no proof of that,
actually. The code pre-dates git.

I believe the real test would be "can this error code leak to user
space?" AFAIU those high error codes are for kernel's internal use.
So any code can use them, if done carefully.
Thread (5 messages) 5 messages, 3 authors, last reply 2020-05-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help