lkml.org 
[lkml]   [2013]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 08/19] arm/xen: get_dma_ops: return xen_dma_ops if we are running as xen_initial_domain
On Fri, Oct 18, 2013 at 01:22:18PM +0100, Stefano Stabellini wrote:
> Russell,
> are you OK with this patch?

Only concern is why the change is soo large.

> > -static inline struct dma_map_ops *get_dma_ops(struct device *dev)
> > +static inline struct dma_map_ops *__generic_dma_ops(struct device *dev)
> > {
> > if (dev && dev->archdata.dma_ops)
> > return dev->archdata.dma_ops;
> > return &arm_dma_ops;
> > }
> >
> > +static inline struct dma_map_ops *get_dma_ops(struct device *dev)
> > +{
> > + if (xen_initial_domain())
> > + return xen_dma_ops;
> > + else
> > + return __generic_dma_ops(dev);
> > +}
> > +

What's wrong with:

static inline struct dma_map_ops *get_dma_ops(struct device *dev)
{
+ if (xen_initial_domain())
+ return xen_dma_ops;
if (dev && dev->archdata.dma_ops)
return dev->archdata.dma_ops;
return &arm_dma_ops;
}



\
 
 \ /
  Last update: 2013-10-18 18:01    [W:0.067 / U:10.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site