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

From
Jakub Kicinski <kuba@kernel.org>
Date
2020-05-11 16:48:23
Reply to
Joe Perches, 2020-05-10
On Sun, 10 May 2020 12:56:53 -0700 Joe Perches wrote:
On Sun, 2020-05-10 at 11:51 -0700, Jakub Kicinski wrote:
quoted
Hi Joe, I feel like I already talked to you about this, but I lost
my email archive, so appologies if you already said no.  
Not so far as I can tell.

This seems OK to me, but using checkpatch -f should probably
not show this error.

You might include a link to where Andrew Lunn suggested it
in the commit message.  I didn't find it with a trivial search.
Will do.
quoted
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl  
[]
quoted
@@ -4199,6 +4199,14 @@ sub process {
 			     "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr);
 		}
 
+# ENOTSUPP is not a standard error code and should be avoided.
+# Folks usually mean EOPNOTSUPP (also called ENOTSUP), when they type ENOTSUPP.
+# Similarly to ENOSYS warning a small number of false positives is expected.
+		if ($line =~ /\bENOTSUPP\b/) {  
So to avoid having newbies and others trying to convert
existing uses in files using checkpatch.pl -f, maybe:
Sounds good, thanks!
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