]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
core: Fix some minor style issues
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 17 Jan 2014 10:21:35 +0000 (11:21 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 17 Jan 2014 10:33:58 +0000 (11:33 +0100)
Found by checkpatch. No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/include/asm/types.h
hypervisor/arch/x86/include/asm/bitops.h
hypervisor/arch/x86/include/asm/control.h
hypervisor/arch/x86/include/asm/paging.h
hypervisor/arch/x86/include/asm/processor.h
hypervisor/arch/x86/include/asm/spinlock.h
hypervisor/arch/x86/include/asm/types.h
hypervisor/arch/x86/mmio.c
hypervisor/arch/x86/vtd.c
hypervisor/include/jailhouse/control.h
hypervisor/paging.c

index 19fd3a52081a06402df85730b8a3e3f09d78a258..38e88bba255a3203587f9992329142c1c6ede29f 100644 (file)
@@ -43,7 +43,7 @@ typedef u32 __u32;
 typedef s64 __s64;
 typedef u64 __u64;
 
-typedef enum { true=1, false=0 } bool;
+typedef enum { true = 1, false = 0 } bool;
 
 struct cpu_set {
        unsigned long max_cpu_id;
index e9e592c98754353b0ca566e0bb632758cd01457d..7c36f26669a13f1ff6a9376fe8e4951b36b5e754 100644 (file)
@@ -43,15 +43,15 @@ clear_bit(int nr, volatile unsigned long *addr)
 static inline __attribute__((always_inline)) void
 set_bit(unsigned int nr, volatile unsigned long *addr)
 {
-        if (__builtin_constant_p(nr)) {
-                asm volatile("lock orb %1,%0"
-                        : CONST_MASK_ADDR(nr, addr)
-                        : "iq" ((u8)CONST_MASK(nr))
-                        : "memory");
-        } else {
-                asm volatile("lock bts %1,%0"
-                        : BITOP_ADDR(addr) : "Ir" (nr) : "memory");
-        }
+       if (__builtin_constant_p(nr)) {
+               asm volatile("lock orb %1,%0"
+                       : CONST_MASK_ADDR(nr, addr)
+                       : "iq" ((u8)CONST_MASK(nr))
+                       : "memory");
+       } else {
+               asm volatile("lock bts %1,%0"
+                       : BITOP_ADDR(addr) : "Ir" (nr) : "memory");
+       }
 }
 
 static inline __attribute__((always_inline)) int
@@ -70,7 +70,7 @@ static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
                     : "=r" (oldbit)
                     : "m" (*(unsigned long *)addr), "Ir" (nr));
 
-        return oldbit;
+       return oldbit;
 }
 
 #define test_bit(nr, addr)                     \
index a766aafe79fe31c02cf21b8c4c046b19abbbca8f..935fcaac7f92204abd4013ce1148e19e2e91ec08 100644 (file)
@@ -15,7 +15,7 @@
 enum x86_init_sipi { X86_INIT, X86_SIPI };
 
 void x86_send_init_sipi(unsigned int cpu_id, enum x86_init_sipi type,
-                       int sipi_vector);
+                       int sipi_vector);
 
 void x86_enter_wait_for_sipi(struct per_cpu *cpu_data);
 int x86_handle_events(struct per_cpu *cpu_data);
index 96053a823186fb3688a685f7a8510e5f5a6a3b0b..bd6e4e73e2b53d92adb02ce25224aebffe408deb 100644 (file)
@@ -31,7 +31,7 @@
 #define PAGE_FLAG_RW           0x02
 #define PAGE_FLAG_UNCACHED     0x10
 
-#define PAGE_DEFAULT_FLAGS     (PAGE_FLAG_PRESENT | PAGE_FLAG_RW )
+#define PAGE_DEFAULT_FLAGS     (PAGE_FLAG_PRESENT | PAGE_FLAG_RW)
 #define PAGE_READONLY_FLAGS    PAGE_FLAG_PRESENT
 #define PAGE_NONPRESENT_FLAGS  0
 
index 4205bf3d9c646b8ed67f8c0c6768a977454dce58..0752e8dba16abd234a9f4d475cc7b78a0b25f1a8 100644 (file)
@@ -146,7 +146,7 @@ static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
 static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx,
                         unsigned int *ecx, unsigned int *edx)
 {
-       *eax =op;
+       *eax = op;
        *ecx = 0;
        __cpuid(eax, ebx, ecx, edx);
 }
index bde9f55537a2388df70763736285d58bc5b087d4..461cc57ac94c57b128e41f3775fad00705d251de 100644 (file)
@@ -30,7 +30,7 @@ static inline void spin_lock(spinlock_t *lock)
 
 static inline void spin_unlock(spinlock_t *lock)
 {
-       asm volatile("": : :"memory");
+       asm volatile("" : : : "memory");
        clear_bit(0, &lock->state);
 }
 
index adabc1dc7c76c72691d0a246e6f4cbbc49028903..89693a17f849362ac48714be5cf2b2c48c652166 100644 (file)
@@ -43,7 +43,7 @@ typedef u32 __u32;
 typedef s64 __s64;
 typedef u64 __u64;
 
-typedef enum { true=1, false=0 } bool;
+typedef enum { true = 1, false = 0 } bool;
 
 struct cpu_set {
        unsigned long max_cpu_id;
index e5171d6140960557e8c0956fe2d710b3e273dcf0..d55b3d2e3b4fb074634e44e4a090d6123a6f866e 100644 (file)
@@ -100,7 +100,7 @@ restart:
                                goto error_nopage;
 
                        sib = *(struct sib *)&page[pc & PAGE_OFFS_MASK];
-                       if (sib.ss !=0 || sib.index != 4 || sib.reg != 5)
+                       if (sib.ss != 0 || sib.index != 4 || sib.reg != 5)
                                goto error_unsupported;
                        access.inst_len += 5;
                        break;
index f4cbe15ce850172a8d3355fd8eb56b8e3b8e6b50..a1a68c57de10d19a85c095db1076517383682812 100644 (file)
@@ -148,7 +148,7 @@ int vtd_init(void)
 }
 
 static bool vtd_add_device_to_cell(struct cell *cell,
-                                  const struct jailhouse_pci_device *device)
+                                  const struct jailhouse_pci_device *device)
 {
        u64 root_entry_lo = root_entry_table[device->bus].lo_word;
        struct vtd_entry *context_entry_table, *context_entry;
index 76b9efd37b6e8f31eeae5a4c02ac452bd8ca12b0..f8e7e81cef5c6da44034c9281c364186131929af 100644 (file)
@@ -22,13 +22,13 @@ extern struct jailhouse_system *system_config;
 unsigned int next_cpu(unsigned int cpu, struct cpu_set *cpu_set,
                      int exception);
 
-#define for_each_cpu(cpu, set)                                         \
+#define for_each_cpu(cpu, set)                                 \
        for ((cpu) = -1;                                        \
             (cpu) = next_cpu((cpu), (set), -1),                \
             (cpu) <= (set)->max_cpu_id;                        \
            )
 
-#define for_each_cpu_except(cpu, set, exception)               \
+#define for_each_cpu_except(cpu, set, exception)               \
        for ((cpu) = -1;                                        \
             (cpu) = next_cpu((cpu), (set), (exception)),       \
             (cpu) <= (set)->max_cpu_id;                        \
index 8e0bdacf7387f2bb602c840daa48dd38fb67a6cf..c6234c3b9e1ebbe1b04d244bdff3bb6e167f31f1 100644 (file)
@@ -318,7 +318,7 @@ void *page_map_get_foreign_page(struct per_cpu *cpu_data,
        if (!pud_valid(pud))
                return NULL;
        phys = arch_page_map_gphys2phys(cpu_data,
-                                       (unsigned long)pmd_offset(pud, 0, 0));
+                                       (unsigned long)pmd_offset(pud, 0, 0));
        if (phys == INVALID_PHYS_ADDR)
                return NULL;
        err = page_map_create(hv_page_table, phys, PAGE_SIZE, page_virt,