On 02.10.2019 19:16, Hongyan Xia wrote: > @@ -5034,10 +5036,13 @@ int map_pages_to_xen( > > while ( nr_mfns != 0 ) > { > - l3_pgentry_t ol3e, *pl3e = virt_to_xen_l3e(virt); > + pl3e = virt_to_xen_l3e(virt); > > if ( !pl3e ) > - return -ENOMEM; > + { > + ASSERT(rc == -ENOMEM); > + goto out; > + }
rc never gets changed to any other error code, and I also can't foresee this happening in the future. Are all these ASSERT()s (and the associated brace pairs) really helpful? Also I think I'd prefer a less strong title, e.g. "would better" instead of "should". Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel