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/inc/cpu.h b/inc/cpu.h
index 0dc561b..58df21d 100644
--- a/inc/cpu.h
+++ b/inc/cpu.h
@@ -17,24 +17,24 @@
/* TODO: Update alignment such that cpus are in different cache lines. */
struct cpu {
- struct spinlock lock;
-
struct vcpu *current;
+ /* CPU identifier. Doesn't have to be contiguous. */
+ size_t id;
+
+ /* Pointer to bottom of the stack. */
+ void *stack_bottom;
+
/*
* Enabling/disabling irqs are counted per-cpu. They are enabled when
* the count is zero, and disabled when it's non-zero.
*/
uint32_t irq_disable_count;
+ struct spinlock lock;
+
/* Determines whether or not the cpu is currently on. */
bool is_on;
-
- /* CPU identifier. Doesn't have to be contiguous. */
- size_t id;
-
- /* Pointer to bottom of the stack. */
- void *stack_bottom;
};
void cpu_module_init(void);
@@ -47,7 +47,7 @@
void cpu_off(struct cpu *c);
void vcpu_init(struct vcpu *vcpu, struct vm *vm);
-void vcpu_on(struct vcpu *v);
-void vcpu_off(struct vcpu *v);
+void vcpu_on(struct vcpu *vcpu);
+void vcpu_off(struct vcpu *vcpu);
#endif /* _CPU_H */
diff --git a/inc/mm.h b/inc/mm.h
index 82066cd..9c129d4 100644
--- a/inc/mm.h
+++ b/inc/mm.h
@@ -34,7 +34,7 @@
bool mm_ptable_init(struct mm_ptable *t, int mode);
void mm_ptable_dump(struct mm_ptable *t);
-bool mm_ptable_map(struct mm_ptable *t, vaddr_t vaddr_begin, vaddr_t vaddr_end,
+bool mm_ptable_map(struct mm_ptable *t, vaddr_t begin, vaddr_t end,
paddr_t paddr, int mode);
bool mm_ptable_map_page(struct mm_ptable *t, vaddr_t va, paddr_t pa, int mode);
bool mm_ptable_unmap(struct mm_ptable *t, vaddr_t begin, vaddr_t end, int mode);