From 47eb1321c8e8519dfd6998e90b8998d004569987 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 16 Jul 2022 09:36:52 +0200 Subject: [PATCH] commonlib: compiler.h: Use non-concise comment style The concise multi-line comment style is for inside function bodies to save space. Outside of it, use non-concise style. Change-Id: I34d9ec6984b598a37c438fa3c395b5478207e31d Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/c/coreboot/+/65885 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- .../bsd/include/commonlib/bsd/compiler.h | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/commonlib/bsd/include/commonlib/bsd/compiler.h b/src/commonlib/bsd/include/commonlib/bsd/compiler.h index 2b06f87f75..87ac0c4aed 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/compiler.h +++ b/src/commonlib/bsd/include/commonlib/bsd/compiler.h @@ -15,19 +15,25 @@ #define __aligned(x) __attribute__((__aligned__(x))) #endif -/* Because there may be variables/parameters whose name contains "__unused" in - header files of libc, namely musl, names consistent with the ones in the - Linux kernel may be a better choice. */ +/* + * Because there may be variables/parameters whose name contains "__unused" in + * header files of libc, namely musl, names consistent with the ones in the + * Linux kernel may be a better choice. + */ -/* This is used to mark identifiers unused in all conditions, e.g. a parameter - completely unused in all code branch, only present to fit an API. */ +/* + * This is used to mark identifiers unused in all conditions, e.g. a parameter + * completely unused in all code branch, only present to fit an API. + */ #ifndef __always_unused #define __always_unused __attribute__((__unused__)) #endif -/* This is used to mark identifiers unused in some conditions, e.g. a parameter - only unused in some code branches, a global variable only accessed with code - being conditionally preprocessed, etc. */ +/* + * This is used to mark identifiers unused in some conditions, e.g. a parameter + * only unused in some code branches, a global variable only accessed with code + * being conditionally preprocessed, etc. + */ #ifndef __maybe_unused #define __maybe_unused __attribute__((__unused__)) #endif @@ -52,13 +58,15 @@ #define __fallthrough __attribute__((__fallthrough__)) #endif -/* This evaluates to the type of the first expression, unless that is constant - in which case it evaluates to the type of the second. This is useful when - assigning macro parameters to temporary variables, because that would - normally circumvent the special loosened type promotion rules for integer - literals. By using this macro, the promotion can happen at the time the - literal is assigned to the temporary variable. If the literal doesn't fit in - the chosen type, -Werror=overflow will catch it, so this should be safe. */ +/* + * This evaluates to the type of the first expression, unless that is constant + * in which case it evaluates to the type of the second. This is useful when + * assigning macro parameters to temporary variables, because that would + * normally circumvent the special loosened type promotion rules for integer + * literals. By using this macro, the promotion can happen at the time the + * literal is assigned to the temporary variable. If the literal doesn't fit in + * the chosen type, -Werror=overflow will catch it, so this should be safe. + */ #define __TYPEOF_UNLESS_CONST(expr, fallback_expr) __typeof__( \ __builtin_choose_expr(__builtin_constant_p(expr), fallback_expr, expr))