[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2 6/9] x86/hvm: address violations of MISRA C Rule 16.2
On 2024-04-08 09:57, Jan Beulich wrote: On 05.04.2024 11:14, Nicola Vetrini wrote:--- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -119,12 +119,12 @@ int hvm_hypercall(struct cpu_user_regs *regs)(mode == 8 ? regs->rdi : regs->ebx) == HVMOP_guest_request_vm_event )break; - if ( unlikely(hvm_get_cpl(curr)) ) - { + if ( !unlikely(hvm_get_cpl(curr)) )likely() / unlikely() want to be the outermost part of a conditional like this (things are different with && or ||), i.e. if ( likely(!hvm_get_cpl(curr)) ) Ok, LGTM Then: Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Jan -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |