diff options
author | Jakub Kicinski <[email protected]> | 2020-05-11 10:08:07 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-05-11 17:00:30 -0700 |
commit | 6b9ea5ff5abdcda9d1291d9b8bbad44c93c7ccef (patch) | |
tree | 77cd27b5c903f53758386bfe3141fe54d3424eb7 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 97cf0ef9305bba857f04b914fd59e83813f1eae2 (diff) |
checkpatch: warn about uses of ENOTSUPP
ENOTSUPP often feels like the right error code to use, but it's
in fact not a standard Unix error. E.g.:
$ python
>>> 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/[email protected]/
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/[email protected]/
v1:
https://lore.kernel.org/netdev/[email protected]/
Suggested-by: Andrew Lunn <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions