On Mon, Jan 23, 2017 at 09:11:06AM -0500, Boris Ostrovsky wrote: > > > > > +static int __init modify_identity_mmio(struct domain *d, unsigned long pfn, > > + unsigned long nr_pages, bool map) > > +{ > > + int rc; > > + > > + for ( ; ; ) > > + { > > + rc = (map ? map_mmio_regions : unmap_mmio_regions) > > This can be taken outside the loop.
Maybe I can instead make map const, and the compiler should optimize this itself? I find it a little cumbersome to store function pointers, ie: int (*mapf)(struct domain *, gfn_t, unsigned long, mfn_t) = ...; Roger. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel