Add more clang-tidy checks.
This adds all the generic checks. There are some more project specific
ones that could be selected but this is a good start and has already
found some lint errors.
Change-Id: I7bb9d9347f5270862c2ff586eb7c86feead9e4bb
diff --git a/src/arch/aarch64/handler.c b/src/arch/aarch64/handler.c
index 8999403..94a9722 100644
--- a/src/arch/aarch64/handler.c
+++ b/src/arch/aarch64/handler.c
@@ -52,6 +52,8 @@
struct hvc_handler_return hvc_handler(size_t arg0, size_t arg1, size_t arg2,
size_t arg3)
{
+ (void)arg3;
+
struct hvc_handler_return ret;
ret.new = NULL;
diff --git a/src/arch/aarch64/mm.c b/src/arch/aarch64/mm.c
index d4898d4..f5dcdf1 100644
--- a/src/arch/aarch64/mm.c
+++ b/src/arch/aarch64/mm.c
@@ -43,7 +43,7 @@
#define STAGE2_WRITETHROUGH 2ull
#define STAGE2_WRITEBACK 3ull
-#define STAGE2_MEMATTR_NORMAL(outer, inner) ((outer << 2) | (inner))
+#define STAGE2_MEMATTR_NORMAL(outer, inner) (((outer) << 2) | (inner))
/* The following stage-2 memory attributes for device memory. */
#define STAGE2_MEMATTR_DEVICE_nGnRnE 0ull
diff --git a/src/arch/aarch64/msr.h b/src/arch/aarch64/msr.h
index 30916db..277ccea 100644
--- a/src/arch/aarch64/msr.h
+++ b/src/arch/aarch64/msr.h
@@ -10,9 +10,11 @@
__v; \
})
-#define write_msr(name, value) \
- do { \
- __asm volatile("msr " #name ", %x0" : : "rZ"((size_t)value)); \
+#define write_msr(name, value) \
+ do { \
+ __asm volatile("msr " #name ", %x0" \
+ : \
+ : "rZ"((size_t)(value))); \
} while (0)
#endif /* _MSR_H */