[LTP] [PATCH 1/1] checkpatch: Ignore USE_NEGATIVE_ERRNO

Petr Vorel pvorel@suse.cz
Fri Jul 10 08:29:21 CEST 2026


return of an errno should typically be negative is purely kernel
specific, avoid warning like:

epoll_ctl06.c:36: WARNING: return of an errno should typically be negative (ie: return -EPERM)

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .checkpatch.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.checkpatch.conf b/.checkpatch.conf
index a7b6219ada..2ede8d54c5 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -12,6 +12,9 @@
 # kernel specific
 --ignore BIT_MACRO,PREFER_DEFINED_ATTRIBUTE_MACRO,PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
 
+# kernel specific (cont)
+--ignore USE_NEGATIVE_ERRNO
+
 # TODO: document reason
 --ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS
 
-- 
2.54.0



More information about the ltp mailing list