[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping
On Wed, May 11, 2016 at 3:26 AM, Xu, Quan <quan.xu@xxxxxxxxx> wrote: > Agreed. Thanks for your careful checking. > > Check it again -- > 1. then I am no need to check 'rc' as below: > > if ( rc == 0 && p2m_is_hostp2m(p2m) && need_iommu(d) && > need_modify_vtd_table ) > { > + if ( !rc ) > + rc = ret; > ... > > + if ( !rc && unlikely(ret) ) > + rc = ret; > } Actually, in the case of iommu_map_page(), you can just use rc directly and not bother using ret at all. (In the case of iommu_unmap_page(), you still need to use ret and check that rc != 0 to make sure you get the first error.) Something like applying the attached patch (not built or nitpicked for style, just for clarity). -George Attachment:
patch3-mod.diff _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |