[LTP] [COMMITTED][PATCH 1/1] fanotify.h: Keep checkpatch.pl happy
Petr Vorel
pvorel@suse.cz
Wed Sep 7 12:41:17 CEST 2022
Fixed all relevant warnings. There are still some warnings, but these
are false positives (kernel specific, LTP should not check for them).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/fanotify/fanotify.h | 23 ++++++++-----------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index ddd365cff..ff2b4a70a 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (c) 2012-2020 Linux Test Project. All Rights Reserved.
* Author: Jan Kara, November 2013
@@ -86,7 +86,7 @@ static inline int safe_fanotify_mark(const char *file, const int lineno,
#ifndef FAN_REPORT_TARGET_FID
#define FAN_REPORT_TARGET_FID 0x00001000
#define FAN_REPORT_DFID_NAME_TARGET (FAN_REPORT_DFID_NAME | \
- FAN_REPORT_FID | FAN_REPORT_TARGET_FID)
+ FAN_REPORT_FID | FAN_REPORT_TARGET_FID)
#endif
/* Non-uapi convenience macros */
@@ -187,12 +187,12 @@ static inline int safe_fanotify_mark(const char *file, const int lineno,
struct fanotify_group_type {
unsigned int flag;
- const char * name;
+ const char *name;
};
struct fanotify_mark_type {
unsigned int flag;
- const char * name;
+ const char *name;
};
#ifndef __kernel_fsid_t
@@ -428,15 +428,13 @@ static inline void fanotify_init_flags_err_msg(const char *flags_str,
#define FANOTIFY_INIT_FLAGS_ERR_MSG(flags, fail) \
fanotify_init_flags_err_msg(#flags, __FILE__, __LINE__, tst_res_, (fail))
-#define REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(flags, fname) do { \
+#define REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(flags, fname) \
fanotify_init_flags_err_msg(#flags, __FILE__, __LINE__, tst_brk_, \
- fanotify_init_flags_supported_on_fs(flags, fname)); \
- } while (0)
+ fanotify_init_flags_supported_on_fs(flags, fname))
-#define REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_BY_KERNEL(flags) do { \
+#define REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_BY_KERNEL(flags) \
fanotify_init_flags_err_msg(#flags, __FILE__, __LINE__, tst_brk_, \
- fanotify_init_flags_supported_by_kernel(flags)); \
- } while (0)
+ fanotify_init_flags_supported_by_kernel(flags))
static inline int fanotify_mark_supported_by_kernel(uint64_t flag)
{
@@ -459,10 +457,9 @@ static inline int fanotify_mark_supported_by_kernel(uint64_t flag)
return rval;
}
-#define REQUIRE_MARK_TYPE_SUPPORTED_BY_KERNEL(mark_type) do { \
+#define REQUIRE_MARK_TYPE_SUPPORTED_BY_KERNEL(mark_type) \
fanotify_init_flags_err_msg(#mark_type, __FILE__, __LINE__, tst_brk_, \
- fanotify_mark_supported_by_kernel(mark_type)); \
-} while (0)
+ fanotify_mark_supported_by_kernel(mark_type))
#define REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS(init_flags, mark_type, mask, fname) do { \
if (mark_type) \
--
2.37.3
More information about the ltp
mailing list