diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-07-01 03:56:25 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-01 20:06:06 +0200 |
commit | 46b85bf96714267ab7855683b40103c9282aaf4e (patch) | |
tree | 0eb9207cde9c9f0f9e952cf1bb324dbc0d55f77d /init | |
parent | checkpatch: improve the indented label test (diff) | |
download | linux-46b85bf96714267ab7855683b40103c9282aaf4e.tar.xz linux-46b85bf96714267ab7855683b40103c9282aaf4e.zip |
checkpatch: do not complain about positive return values starting with EPOLL
checkpatch complains about positive return values of poll functions.
Example:
WARNING: return of an errno should typically be negative (ie: return -EPOLLIN)
+ return EPOLLIN;
Poll functions return positive values. The defines for the return values
of poll functions all start with EPOLL, resulting in a number of false
positives. An often used workaround is to assign poll function return
values to variables and returning that variable, but that is a less than
perfect solution.
There is no error definition which starts with EPOLL, so it is safe to
omit the warning for return values starting with EPOLL.
Link: https://lkml.kernel.org/r/20210622004334.638680-1-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Joe Perches <joe@perches.com>
Cc: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions