diff options
author | наб <[email protected]> | 2022-01-21 17:07:15 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-01-26 11:38:52 -0800 |
commit | 7ada752a934f79d87fb9ef998455f26fd07f59a7 (patch) | |
tree | fadcb89e9710da5b7ad2d5b6f26c94eb1ca96d50 /include/os/freebsd/spl/sys/debug.h | |
parent | a3fecf4f1059f4afcead0e7a502ffe8babb1e39c (diff) |
Clean up CSTYLEDs
69 CSTYLED BEGINs remain, appx. 30 of which can be removed if cstyle(1)
had a useful policy regarding
CALL(ARG1,
ARG2,
ARG3);
above 2 lines. As it stands, it spits out *both*
sysctl_os.c: 385: continuation line should be indented by 4 spaces
sysctl_os.c: 385: indent by spaces instead of tabs
which is very cool
Another >10 could be fixed by removing "ulong" &al. handling.
I don't foresee anyone actually using it intentionally
(does it even exist in modern headers? why did it in the first place?).
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12993
Diffstat (limited to 'include/os/freebsd/spl/sys/debug.h')
-rw-r--r-- | include/os/freebsd/spl/sys/debug.h | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/include/os/freebsd/spl/sys/debug.h b/include/os/freebsd/spl/sys/debug.h index c3d7a6e83..6b440ed31 100644 --- a/include/os/freebsd/spl/sys/debug.h +++ b/include/os/freebsd/spl/sys/debug.h @@ -64,69 +64,68 @@ void spl_dumpstack(void); #define likely(expr) expect((expr) != 0, 1) #define unlikely(expr) expect((expr) != 0, 0) -/* BEGIN CSTYLED */ #define PANIC(fmt, a...) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) -#define VERIFY(cond) \ - (void) (unlikely(!(cond)) && \ +#define VERIFY(cond) \ + (void) (unlikely(!(cond)) && \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "%s", "VERIFY(" #cond ") failed\n")) -#define VERIFY3B(LEFT, OP, RIGHT) do { \ +#define VERIFY3B(LEFT, OP, RIGHT) do { \ const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT);\ + const boolean_t _verify3_right = (boolean_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%d " #OP " %d)\n", \ - (boolean_t) (_verify3_left), \ - (boolean_t) (_verify3_right)); \ + "failed (%d " #OP " %d)\n", \ + (boolean_t)(_verify3_left), \ + (boolean_t)(_verify3_right)); \ } while (0) -#define VERIFY3S(LEFT, OP, RIGHT) do { \ +#define VERIFY3S(LEFT, OP, RIGHT) do { \ const int64_t _verify3_left = (int64_t)(LEFT); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%lld " #OP " %lld)\n", \ - (long long) (_verify3_left), \ - (long long) (_verify3_right)); \ + "failed (%lld " #OP " %lld)\n", \ + (long long) (_verify3_left), \ + (long long) (_verify3_right)); \ } while (0) -#define VERIFY3U(LEFT, OP, RIGHT) do { \ +#define VERIFY3U(LEFT, OP, RIGHT) do { \ const uint64_t _verify3_left = (uint64_t)(LEFT); \ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%llu " #OP " %llu)\n", \ - (unsigned long long) (_verify3_left), \ - (unsigned long long) (_verify3_right)); \ + "failed (%llu " #OP " %llu)\n", \ + (unsigned long long) (_verify3_left), \ + (unsigned long long) (_verify3_right)); \ } while (0) -#define VERIFY3P(LEFT, OP, RIGHT) do { \ +#define VERIFY3P(LEFT, OP, RIGHT) do { \ const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ - const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\ + const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%px " #OP " %px)\n", \ - (void *) (_verify3_left), \ - (void *) (_verify3_right)); \ + "failed (%px " #OP " %px)\n", \ + (void *) (_verify3_left), \ + (void *) (_verify3_right)); \ } while (0) -#define VERIFY0(RIGHT) do { \ - const int64_t _verify3_left = (int64_t)(0); \ +#define VERIFY0(RIGHT) do { \ + const int64_t _verify3_left = (int64_t)(0); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left == _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(0 == " #RIGHT ") " \ - "failed (0 == %lld)\n", \ - (long long) (_verify3_right)); \ + "VERIFY3(0 == " #RIGHT ") " \ + "failed (0 == %lld)\n", \ + (long long) (_verify3_right)); \ } while (0) -#define CTASSERT_GLOBAL(x) CTASSERT(x) +#define CTASSERT_GLOBAL(x) CTASSERT(x) /* * Debugging disabled (--disable-debug) @@ -167,7 +166,6 @@ void spl_dumpstack(void); ((void)(likely(!!(A) == !!(B)) || \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ "(" #A ") is equivalent to (" #B ")"))) -/* END CSTYLED */ #endif /* NDEBUG */ |