linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gong <clumsycg@gmail.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/85xx: Add support for MPC8536DS
Date: Wed, 02 Jul 2008 23:27:15 +0800	[thread overview]
Message-ID: <486B9E53.7070606@gmail.com> (raw)
In-Reply-To: <F2A6FF1A-CF7F-4B2A-94B3-4C0E0693CB21@kernel.crashing.org>

Kumar Gala 写道:
> 
> On Jul 2, 2008, at 9:04 AM, Chen Gong wrote:
> 
>> Stephen Rothwell 写道:
>>> Hi Kumar,
>>>
>>> On Wed, 2 Jul 2008 02:01:10 -0500 (CDT) Kumar Gala 
>>> <galak@kernel.crashing.org> wrote:
>>>> +void __init mpc8536_ds_pic_init(void)
>>>> +{
>>>> +    struct mpic *mpic;
>>>> +    struct resource r;
>>>> +    struct device_node *np = NULL;
>>>
>>> You don't need to initialise this.
>>>
>>>> +    np = of_find_node_by_type(np, "open-pic");
>>>> +
>>>
>>> Extra blank line.
>>>
>>>> +    if (np == NULL) {
>>>> +        printk(KERN_ERR "Could not find open-pic node\n");
>>>> +        return;
>>>> +    }
>>>> +
>>>> +    if (of_address_to_resource(np, 0, &r)) {
>>>> +        printk(KERN_ERR "Failed to map mpic register space\n");
>>>> +        of_node_put(np);
>>>> +        return;
>>>> +    }
>>>> +
>>>> +    mpic = mpic_alloc(np, r.start,
>>>> +              MPIC_PRIMARY | MPIC_WANTS_RESET |
>>>> +              MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
>>>> +            0, 256, " OpenPIC  ");
>>>> +    BUG_ON(mpic == NULL);
>>>> +
>>>> +    mpic_init(mpic);
>>>
>>> You leak a reference to np here.
>>
>> It looks like there are same problem in other mpc85xx_xx.c files
> 
> agreed for the mpc85xx_ds.c, I dont see the _cds or _ads having these 
> issues.

Yes, maybe I should write as mpc8xxx_xx.c, because it seems there is
the same problem in mpc8610_hpcd.c mpc86xx_hpcn.c etc.
> 
> - k
> 
> 

      reply	other threads:[~2008-07-02 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02  7:01 [PATCH] powerpc/85xx: Add support for MPC8536DS Kumar Gala
2008-07-02  7:08 ` Stephen Rothwell
2008-07-02  7:19   ` [PATCH v2] " Kumar Gala
2008-07-02 14:04   ` [PATCH] " Chen Gong
2008-07-02 15:03     ` Kumar Gala
2008-07-02 15:27       ` Chen Gong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486B9E53.7070606@gmail.com \
    --to=clumsycg@gmail.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).