From: Andrew Cooper Date: Mon, 5 Nov 2018 16:03:03 +0000 (+0000) Subject: x86/traps: Misc non-functional cleanup X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9ed942e23e11dffea1ec2a63662d6f13a61a5778;p=people%2Fsstabellini%2Fxen-unstable.git%2F.git x86/traps: Misc non-functional cleanup * s/unsigned char/uint8_t/ for clarity * Drop redundant return at the end of a void function Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 7765f9a5d7..9471d89022 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -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 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)