[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/9] xen: sched: make implementing .alloc_pdata optional
>>> On 29.09.15 at 18:56, <dario.faggioli@xxxxxxxxxx> 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@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |