[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200511094819.08f22e84@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 11 May 2020 09:48:19 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Joe Perches <joe@...ches.com>
Cc: davem@...emloft.net, Andrew Morton <akpm@...ux-foundation.org>,
netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next] checkpatch: warn about uses of ENOTSUPP
On Sun, 10 May 2020 12:56:53 -0700 Joe Perches wrote:
> On Sun, 2020-05-10 at 11:51 -0700, Jakub Kicinski wrote:
> > 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.
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -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!
Powered by blists - more mailing lists