> Hi Gavin, > > On Fri, 24 Feb 2012 17:38:11 +0800 Gavin Shan <sha...@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 s...@canb.auug.org.au > http://www.canb.auug.org.au/~sfr/ _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev