From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by ozlabs.org (Postfix) with ESMTP id 79FA1DDF47 for ; Thu, 3 Jul 2008 00:04:54 +1000 (EST) Received: by py-out-1112.google.com with SMTP id z59so180889pyg.27 for ; Wed, 02 Jul 2008 07:04:53 -0700 (PDT) Message-ID: <486B8AFE.7060303@gmail.com> Date: Wed, 02 Jul 2008 22:04:46 +0800 From: Chen Gong MIME-Version: 1.0 To: Stephen Rothwell Subject: Re: [PATCH] powerpc/85xx: Add support for MPC8536DS References: <20080702170814.de282293.sfr@canb.auug.org.au> In-Reply-To: <20080702170814.de282293.sfr@canb.auug.org.au> Content-Type: text/plain; charset=GB2312 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Stephen Rothwell дµÀ: > Hi Kumar, > > On Wed, 2 Jul 2008 02:01:10 -0500 (CDT) Kumar Gala 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 > >> +static struct of_device_id mpc8536_ds_ids[] = { > > __initdata, please. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev