include/common.h: Format with clang-format
BRANCH=none
TEST=none
*/
#define CELSIUS_TO_DECI_KELVIN(temp_c) \
(round_divide(CELSIUS_TO_MILLI_KELVIN(temp_c), 100))
-#define DECI_KELVIN_TO_CELSIUS(temp_dk) \
- (MILLI_KELVIN_TO_CELSIUS((temp_dk) * 100))
+#define DECI_KELVIN_TO_CELSIUS(temp_dk) (MILLI_KELVIN_TO_CELSIUS((temp_dk)*100))
#define MILLI_KELVIN_TO_MILLI_CELSIUS(temp_mk) ((temp_mk)-273150)
#define MILLI_CELSIUS_TO_MILLI_KELVIN(temp_mc) ((temp_mc) + 273150)
#define MILLI_KELVIN_TO_KELVIN(temp_mk) (round_divide((temp_mk), 1000))
(((target)*1000) / (1000 + (tenths_percent)))
/* Call a function, and return the error value unless it returns EC_SUCCESS. */
-#define RETURN_ERROR(fn) do { \
+#define RETURN_ERROR(fn) \
+ do { \
int error = (fn); \
if (error != EC_SUCCESS) \
return error; \
@@ -406,11 +406,8 @@ enum ec_error_list {
* appropriate in the context.
*/
#define __cfg_select_build_assert(cfg, value, empty, undef) \
- __cfg_select( \
- value, \
- empty, \
- BUILD_ASSERT( \
- __builtin_strcmp(cfg, #value) == 0); \
+ __cfg_select(value, empty, \
+ BUILD_ASSERT(__builtin_strcmp(cfg, #value) == 0); \
undef)
/*
@@ -437,9 +434,9 @@ enum ec_error_list {
* the undefined function call.
*/
#define __config_enabled(cfg, value) \
- __cfg_select( \
- value, 1, ({ \
- int __undefined = __builtin_strcmp(cfg, #value) == 0; \
+ __cfg_select(value, 1, ({ \
+ int __undefined = \
+ __builtin_strcmp(cfg, #value) == 0; \
extern int IS_ENABLED_BAD_ARGS(void) __error( \
cfg " must be <blank>, or not defined."); \
if (!__undefined) \
