[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] xen/arm: Make HAS_PCI compilable on ARM by adding place-holder code



On Tue, 14 Apr 2015, Jaggi, Manish wrote:
> > diff --git a/xen/include/asm-arm/pci.h b/xen/include/asm-arm/pci.h
> > index de13359..b8ec882 100644
> > --- a/xen/include/asm-arm/pci.h
> > +++ b/xen/include/asm-arm/pci.h
> > @@ -1,7 +1,8 @@
> > -#ifndef __X86_PCI_H__
> > -#define __X86_PCI_H__
> > +#ifndef __ARM_PCI_H__
> > +#define __ARM_PCI_H__
> >
> >  struct arch_pci_dev {
> > +    void *dev;
> 
> void * is error-prone. Why can't you use the use the real structure?
> 
> [manish]Will change it.  I believe dev_archdata structure has also a void *  
> (in asm-arm/device.h). So all void * are error prone in xen ?
> 

As you know void* works around the type system, so it prevents the
compiler from making many type safety checks. We should try to avoid
them if we can.

I think that you are right, the void *iommu in dev_archdata should
actually be struct arm_smmu_xen_device *iommu.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.