]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/traps: Misc non-functional cleanup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Nov 2018 16:03:03 +0000 (16:03 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Nov 2018 17:07:11 +0000 (17:07 +0000)
 * s/unsigned char/uint8_t/ for clarity
 * Drop redundant return at the end of a void function

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c

index 7765f9a5d7fb3b428c0ce93ba37e03baa7d04f81..9471d89022338074b7e714558ab27c3d5655cb20 100644 (file)
@@ -1537,9 +1537,9 @@ void do_general_protection(struct cpu_user_regs *regs)
     if ( regs->error_code & X86_XEC_IDT )
     {
         /* This fault must be due to <INT n> instruction. */
-        const struct trap_info *ti;
-        unsigned char vector = regs->error_code >> 3;
-        ti = &v->arch.pv.trap_ctxt[vector];
+        uint8_t vector = regs->error_code >> 3;
+        const struct trap_info *ti = &v->arch.pv.trap_ctxt[vector];
+
         if ( permit_softint(TI_GET_DPL(ti), v, regs) )
         {
             regs->rip += 2;
@@ -1785,8 +1785,6 @@ void do_device_not_available(struct cpu_user_regs *regs)
 #else
     ASSERT_UNREACHABLE();
 #endif
-
-    return;
 }
 
 void do_debug(struct cpu_user_regs *regs)