include/hooks.h: Format with clang-format
BRANCH=none
TEST=none
@@ -352,10 +352,11 @@ int hook_call_deferred(const struct deferred_data *data, int us);
* order in which hooks are called.
*/
#define DECLARE_HOOK(hooktype, routine, priority) \
- const struct hook_data __keep __no_sanitize_address \
- CONCAT4(__hook_, hooktype, _, routine) \
- __attribute__((section(".rodata." STRINGIFY(hooktype)))) \
- = {routine, priority}
+ const struct hook_data __keep __no_sanitize_address CONCAT4( \
+ __hook_, hooktype, _, routine) \
+ __attribute__((section(".rodata." STRINGIFY(hooktype)))) = { \
+ routine, priority \
+ }
/**
* Register a deferred function call.
@@ -377,10 +378,9 @@ int hook_call_deferred(const struct deferred_data *data, int us);
* @param routine Function pointer, with prototype void routine(void)
*/
#define DECLARE_DEFERRED(routine) \
- const struct deferred_data __keep __no_sanitize_address \
- CONCAT2(routine, _data) \
- __attribute__((section(".rodata.deferred"))) \
- = {routine}
+ const struct deferred_data __keep __no_sanitize_address CONCAT2( \
+ routine, _data) \
+ __attribute__((section(".rodata.deferred"))) = { routine }
#else
/*
* Stub implementation in case hooks are disabled (neither
@@ -388,9 +388,15 @@ int hook_call_deferred(const struct deferred_data *data, int us);
*/
#define hook_call_deferred(unused1, unused2) -1
#define DECLARE_HOOK(t, func, p) \
- void CONCAT2(unused_hook_, func)(void) { func(); }
+ void CONCAT2(unused_hook_, func)(void) \
+ { \
+ func(); \
+ }
#define DECLARE_DEFERRED(func) \
- void CONCAT2(unused_deferred_, func)(void) { func(); }
+ void CONCAT2(unused_deferred_, func)(void) \
+ { \
+ func(); \
+ }
#endif
#endif /* __CROS_EC_HOOKS_H */
