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

From
Joe Perches <joe@perches.com>
Date
2020-05-11 17:16:38
Also in
lkml
Reply to
Jakub Kicinski, 2020-05-11
On Mon, 2020-05-11 at 10:08 -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.:

$ python
quoted
quoted
quoted
import errno
errno.errorcode[errno.ENOTSUPP]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'errno' has no attribute 'ENOTSUPP'

There were numerous commits converting the uses back to EOPNOTSUPP
but in some cases we are stuck with the high error code for backward
compatibility reasons.

Let's try prevent more ENOTSUPPs from getting into the kernel.

Recent example:
https://lore.kernel.org/netdev/20200510182252.GA411829@lunn.ch/ (local)

v3 (Joe):
 - fix the "not file" condition.

v2 (Joe):
 - add a link to recent discussion,
 - don't match when scanning files, not patches to avoid sudden
   influx of conversion patches.
https://lore.kernel.org/netdev/20200511165319.2251678-1-kuba@kernel.org/ (local)

v1:
https://lore.kernel.org/netdev/20200510185148.2230767-1-kuba@kernel.org/ (local)

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Joe Perches <joe@perches.com>
---
Thanks.

No worries here and it's not worth a respin, but
typically the patch changelog goes below the --- line.

Thread (4 messages) 4 messages, 3 authors, last reply 2020-05-12
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