lkml.org 
[lkml]   [2020]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2] checkpatch: warn about uses of ENOTSUPP
On Mon, 11 May 2020 10:03:31 -0700 Joe Perches wrote:
> On Mon, 2020-05-11 at 09:53 -0700, Jakub Kicinski wrote:
> > ENOTSUPP often feels like the right error code to use, but it's
> > in fact not a standard Unix error. E.g.:
> []
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -4199,6 +4199,17 @@ sub process {
> > "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr);
> > }
> >
> > +# ENOTSUPP is not a standard error code and should be avoided in new patches.
> > +# Folks usually mean EOPNOTSUPP (also called ENOTSUP), when they type ENOTSUPP.
> > +# Similarly to ENOSYS warning a small number of false positives is expected.
> > + if (~$file && $line =~ /\bENOTSUPP\b/) {
>
> It's probably my typo or my brain thinking "not" and hitting
> the tilde and not the bang, but this should be
>
> if (!$file & ...)

Ahh! :)

> Otherwise:
>
> Acked-by: Joe Perches <joe@perches.com>

Thanks!

\
 
 \ /
  Last update: 2020-05-11 19:08    [W:0.047 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site