aboutsummaryrefslogtreecommitdiff
path: root/src/zjs_common.h
diff options
context:
space:
mode:
authorJimmy Huang <jimmy.huang@linux.intel.com>2017-07-07 09:50:19 -0700
committerGeoff Gustafson <geoff@linux.intel.com>2017-07-07 09:50:19 -0700
commit05fda87bf80f3d8f13e809fe260e54707360eed0 (patch)
treeca71c11d3989c373aacbdb6caa8446322c318916 /src/zjs_common.h
parent033406567c9c00fe039675547767134daab9200b (diff)
[general] Clean up for formatting (#1314)
The patch does the following: - Sorting include headers - Wrap lines more than 80 characters - Make function declaration/definition consistent - Align args - Remove spaces and fix indentation - Add comments for includes - Fix pointer alignment Most of the styling is formatting using clang-format and then applying manual tweaks to fit our project style. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
Diffstat (limited to 'src/zjs_common.h')
-rw-r--r--src/zjs_common.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/zjs_common.h b/src/zjs_common.h
index 8142f2b..838673e 100644
--- a/src/zjs_common.h
+++ b/src/zjs_common.h
@@ -5,14 +5,16 @@
// This file includes code common to both X86 and ARC
+// C includes
#include <stdio.h>
-#if CONFIG_ARC
-#include <misc/printk.h>
-#endif
#ifdef ZJS_LINUX_BUILD
#include "zjs_linux_port.h"
#else
+// Zephyr includes
+#if CONFIG_ARC
+#include <misc/printk.h>
+#endif
#include <zephyr/types.h>
#endif
@@ -36,18 +38,23 @@ char *zjs_shorten_filepath(char *filepath);
int zjs_get_sec(void);
int zjs_get_ms(void);
-#define DBG_PRINT \
- ZJS_PRINT("\n%u.%3.3u %s:%d %s():\n(INFO) ", zjs_get_sec(), zjs_get_ms(), zjs_shorten_filepath(__FILE__), __LINE__, __func__); \
+#define DBG_PRINT \
+ ZJS_PRINT("\n%u.%3.3u %s:%d %s():\n(INFO) ", zjs_get_sec(), zjs_get_ms(), \
+ zjs_shorten_filepath(__FILE__), __LINE__, __func__); \
ZJS_PRINT
-#define ERR_PRINT \
- ZJS_PRINT("\n%u.%3.3u %s:%d %s():\n(ERROR) ", zjs_get_sec(), zjs_get_ms(), zjs_shorten_filepath(__FILE__), __LINE__, __func__); \
+#define ERR_PRINT \
+ ZJS_PRINT("\n%u.%3.3u %s:%d %s():\n(ERROR) ", zjs_get_sec(), zjs_get_ms(), \
+ zjs_shorten_filepath(__FILE__), __LINE__, __func__); \
ZJS_PRINT
#else
-#define DBG_PRINT(fmat ...) do {} while(0);
-#define ERR_PRINT \
- ZJS_PRINT("\n%s:%d %s():\n(ERROR) ", zjs_shorten_filepath(__FILE__), __LINE__, __func__); \
+#define DBG_PRINT(fmat...) \
+ do { \
+ } while (0);
+#define ERR_PRINT \
+ ZJS_PRINT("\n%s:%d %s():\n(ERROR) ", zjs_shorten_filepath(__FILE__), \
+ __LINE__, __func__); \
ZJS_PRINT
#endif