[PATCH 14/21] Introduce EEH device

Gavin Shan shangw at linux.vnet.ibm.com
Tue Feb 28 12:26:26 EST 2012


> Hi Gavin,
> 
> On Fri, 24 Feb 2012 17:38:11 +0800 Gavin Shan <shangw at linux.vnet.ibm.com> wrote:
> >
> > diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
> > index d57c08a..4668344 100644
> > --- a/arch/powerpc/include/asm/device.h
> > +++ b/arch/powerpc/include/asm/device.h
> > @@ -31,6 +31,9 @@ struct dev_archdata {
> >  #ifdef CONFIG_SWIOTLB
> >  	dma_addr_t		max_direct_dma_addr;
> >  #endif
> > +#ifdef CONFIG_EEH
> > +	void			*edev;
> > +#endif
> >  };
> >  
> >  struct pdev_archdata {
> > diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
> > index ad8f318..1310971 100644
> > --- a/arch/powerpc/include/asm/eeh.h
> > +++ b/arch/powerpc/include/asm/eeh.h
> > +#define OF_NODE_TO_EEH_DEV(dn)		((struct eeh_dev *)(dn->edev))
> > +#define PCI_DEV_TO_EEH_DEV(pdev)	((struct eeh_dev *)(pdev->dev.archdata.edev))
> 
> If the edev fields of dev_archdata and device_node are always going to be
> "struct eeh_dev *", why not declare then as such and avoid the casting?
> 

Thanks for your comments, Stephen. I'll change it in next revision accordingly.

Thanks,
Gavin

> -- 
> Cheers,
> Stephen Rothwell                    sfr at canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/




More information about the Linuxppc-dev mailing list