On 05/04/2016 05:45 PM, Jan Beulich wrote: >> + *msr &= 0x1fff; >> > + return &d->arch.monitor_msr_bitmap->high; >> > + >> > + default: >> > + return NULL; >> > + } >> > +} >> > + >> > +static int monitor_enable_msr(struct domain *d, u32 msr) >> > +{ >> > + u32 *bitmap; > Together with the above - unsigned long * please (and the helper > function's return type should then also be unsigned long *).
But returning unsigned long * from the helper function would require three aditional casts (when returning &d->arch.monitor_msr_bitmap->{low,hypervisor,high}), otherwise the compiler will complain about incompatible pointer types. Leaving the helper to return void * avoids this extra clutter. Thanks, Razvan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel