selftests/x86: Style fixes for the 'unwind_vdso' test
authorAndy Lutomirski <luto@kernel.org>
Tue, 13 Oct 2015 00:32:12 +0000 (17:32 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 14 Oct 2015 14:56:28 +0000 (16:56 +0200)
Checkpatch is really quite bad for user code like this, but it
caught two legit style issues.

Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/3335040bdd40d2bca4b1a28a3f8b165361c801b7.1444696194.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/unwind_vdso.c

index 5992ff24ab83dfa45119614338ba85f85642c84f..00a26a82fa98b1eec4f82046b9a88517ceb8c7e4 100644 (file)
@@ -134,7 +134,7 @@ _Unwind_Reason_Code trace_fn(struct _Unwind_Context * ctx, void *opaque)
 
 static void sigtrap(int sig, siginfo_t *info, void *ctx_void)
 {
-       ucontext_t *ctx = (ucontext_t*)ctx_void;
+       ucontext_t *ctx = (ucontext_t *)ctx_void;
        struct unwind_state state;
        unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP];
 
@@ -192,7 +192,9 @@ int main()
                 * affected by libc/19006 (https://sourceware.org/PR19006).
                 */
                printf("[WARN]\tsyscall(2) didn't enter AT_SYSINFO\n");
-       } if (get_eflags() & X86_EFLAGS_TF) {
+       }
+
+       if (get_eflags() & X86_EFLAGS_TF) {
                printf("[FAIL]\tTF is still set\n");
                nerrs++;
        }