[PATCH 1/2] [POWERPC] Add PPC4xx L2-cache support (440GX &	460EX/GT)
    Stephen Rothwell 
    sfr at canb.auug.org.au
       
    Thu Mar 20 10:27:10 EST 2008
    
    
  
Hi Stefan,
Just a few trivial things ...
On Tue, 18 Mar 2008 14:36:29 +0100 Stefan Roese <sr at denx.de> wrote:
>
> +++ b/arch/powerpc/sysdev/ppc4xx_soc.c
>
> +static int __init ppc4xx_l2c_probe(void)
> +{
> +	struct device_node *np = NULL;
This initialisation is unneeded.
> +	/* Map DCRs */
> +	dcrreg = of_get_property(np, "dcr-reg", &len);
> +	if (!dcrreg || (len != 4*sizeof(u32))) {
I prefer spaces around binary operators.
> +		printk(KERN_ERR "%s: Can't get DCR register base !",
> +		       np->full_name);
> +		return -ENODEV;
Since of_find_compatible_node() gets a reference to np, you need an
of_node_put(np) before you return.
> +	if (irq == NO_IRQ) {
> +		printk(KERN_ERR "irq_of_parse_and_map failed\n");
> +		return -ENODEV;
And again.
> +	if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) {
> +		printk(KERN_ERR "Cannot install L2C error handler"
> +		       ", cache is not enabled\n");
> +		return -ENODEV;
And again.
> +	return 0;
And again.
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080320/e463f657/attachment.pgp>
    
    
More information about the Linuxppc-dev
mailing list