Skip to contentSkip to conversation

seccomp: fix kernel-doc function name warning

PATCH Applied Randy Dunlap 2 participants 2 messages Jan 8, 2023 – Jan 14, 2023 Secure computing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 seccomp: fix kernel-doc function name warning

Move the ACTION_ONLY() macro so that it is not between the kernel-doc notation and the function definition for seccomp_run_filters(), eliminating a kernel-doc warning:

kernel/seccomp.c:400: warning: expecting prototype for seccomp_run_filters(). Prototype was for ACTION_ONLY() instead

Cc Kees Cook <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Will Drewry <[email protected]>
---
 kernel/seccomp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/seccomp.c +1 -1
diff -- a/kernel/seccomp.c b/kernel/seccomp.c
@@ -388,6 +388,7 @@ static inline bool seccomp_cache_check_a
 }
 #endif /* SECCOMP_ARCH_NATIVE */
 
+#define ACTION_ONLY(ret) ((s32)((ret) & (SECCOMP_RET_ACTION_FULL)))
 /**
  * seccomp_run_filters - evaluates all seccomp filters against @sd
  * @sd: optional seccomp data to be passed to filters
@@ -397,7 +398,6 @@ static inline bool seccomp_cache_check_a
  *
  * Returns valid seccomp BPF response codes.
  */
-#define ACTION_ONLY(ret) ((s32)((ret) & (SECCOMP_RET_ACTION_FULL)))
 static u32 seccomp_run_filters(const struct seccomp_data *sd,
 			       struct seccomp_filter **match)
 {
Applied
#1 lore raw
Quoted 8 lines · Randy Dunlap

Move the ACTION_ONLY() macro so that it is not between the kernel-doc notation and the function definition for seccomp_run_filters(), eliminating a kernel-doc warning:

kernel/seccomp.c:400: warning: expecting prototype for seccomp_run_filters(). Prototype was for ACTION_ONLY() instead

[...]

Applied to for-next/seccomp, thanks!

[1/1] seccomp: fix kernel-doc function name warning

      https://git.kernel.org/kees/c/0fb0624b15d2
Signature · 1 line
Kees Cook