>>> On 29.09.15 at 18:56, <dario.faggi...@citrix.com> wrote: > @@ -1501,8 +1501,8 @@ int schedule_cpu_switch(unsigned int cpu, struct > cpupool *c) > return 0; > > idle = idle_vcpu[cpu]; > - ppriv = SCHED_OP(new_ops, alloc_pdata, cpu); > - if ( ppriv == NULL ) > + if ( (new_ops->alloc_pdata != NULL) && > + ((ppriv = new_ops->alloc_pdata(new_ops, cpu)) == NULL) ) > return -ENOMEM;
I think this should be solved without open coding SCHED_OP(): Make use of the helpers in xen/err.h and have NULL become a variant of success. Then you at once allow errors other than out-of-memory to be properly communicated. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel