[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()
Hi, At 16:12 +0100 on 21 Jun (1498061549), Andrew Cooper wrote: > sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() > infrasturcture, but take the opportunity to avoid opencoding it. s/sturct/struct/. > @@ -4752,8 +4752,8 @@ sh_x86_emulate_write(struct vcpu *v, unsigned long > vaddr, void *src, > return X86EMUL_UNHANDLEABLE; > > addr = sh_emulate_map_dest(v, vaddr, bytes, sh_ctxt); > - if ( sh_emulate_map_dest_failed(addr) ) > - return (long)addr; > + if ( IS_ERR(addr) ) > + return ~PTR_ERR(addr); Using "return ~PTR_ERR(addr)" when the usual idiom is "return -PTR_ERR(foo)" is a bit subtle. Still, the code seems to be correct, so if people prefer it, Acked-by: Tim Deegan <tim@xxxxxxx> Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |