Hi Jason, Just a couple of comments. All of which you may ignore. :-)
On Fri, 16 May 2008 17:50:45 +0800 Jason Jin <[EMAIL PROTECTED]> wrote: > > +static int fsl_msi_free_dt_hwirqs(struct fsl_msi *msi) > +{ > + if ((len % 0x8) != 0) { why not (len % (2 * sizeof(u32))) ? > + /* Format is: (<u32 start> <u32 count>)+ */ > + len /= sizeof(u32); > + len /= 2; len /= 2 * sizeof(u32); > + for (i = 0; i < len; i++, p += 2) for (len /= 2 * sizeof(u32); len; len--, p += 2) These are just style so you can ignore me if you like :-) > +static int __devinit fsl_of_msi_probe(struct of_device *dev, > + const struct of_device_id *match) > +{ > + struct fsl_msi *msi; > + struct resource res; > + int err, i, count; > + int rc; > + int virt_msir; > + const u32 *p; > + struct fsl_msi_feature *tmp_data; > + > + printk(KERN_DEBUG "Setting up Freescale MSI support\n"); > + > + msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL); > + if (!msi) { > + dev_err(&dev->dev, "No memory for MSI structure\n"); > + err = -ENOMEM; > + goto error_out; > + } > + > + msi->of_node = dev->node; You need to of_node_get dev->node [i.e. msi->of_node = of_node_get(dev->node)] and if you delay this as far as possible, you won't need of_node_put(msi->of_node) in the erro path. > + msi->irqhost = irq_alloc_host(of_node_get(dev->node), irq_alloc_host should do the of_node_get if it needs to. Which it doesn't (at the moment), so just leave it as you have it and it will be cleaned up when irq_alloc_host is fixed. -- Cheers, Stephen Rothwell [EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/
pgpGdVyaT7utR.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev