From: Ameya Palande <ameya.palande@nokia.com>
To: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Contreras Felipe (Nokia-D/Helsinki)"
<felipe.contreras@nokia.com>, "Menon, Nishanth" <nm@ti.com>,
"Chitriki Rudramuni, Deepak" <deepak.chitriki@ti.com>,
"Ramirez Luna, Omar" <omar.ramirez@ti.com>
Subject: RE: [PATCHv4 2/4] DSPBRIDGE: New reserved memory accounting framework
Date: Thu, 18 Feb 2010 16:48:54 +0200 [thread overview]
Message-ID: <1266504534.2105.13.camel@sanganak> (raw)
In-Reply-To: <496565EC904933469F292DDA3F1663E602CA2B9AD0@dlee06.ent.ti.com>
Hi Fernando,
On Thu, 2010-02-18 at 02:40 +0100, ext Guzman Lugo, Fernando wrote:
> Hi,
>
> >-----Original Message-----
> >From: Ameya Palande [mailto:ameya.palande@nokia.com]
> >Sent: Wednesday, February 17, 2010 12:06 PM
> >To: linux-omap@vger.kernel.org
> >Cc: felipe.contreras@nokia.com; Menon, Nishanth; Chitriki Rudramuni,
> >Deepak; Guzman Lugo, Fernando; Ramirez Luna, Omar
> >Subject: [PATCHv4 2/4] DSPBRIDGE: New reserved memory accounting framework
> >
> >DSP_RSV_OBJECT is introduced to track reserved memory accounting
> >information.
> >This will allow us to do proper cleanup for memory reserved using
> >PROC_ReserveMemory().
> >
> >Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
> >---
> >@@ -1720,18 +1736,32 @@ DSP_STATUS PROC_UnReserveMemory(DSP_HPROCESSOR
> >hProcessor, void *pRsvAddr)
> > "InValid Processor Handle \n");
> > goto func_end;
> > }
> >+
> > status = DMM_GetHandle(pProcObject, &hDmmMgr);
> >- if (DSP_FAILED(status))
> >+ if (DSP_FAILED(status)) {
> > GT_1trace(PROC_DebugMask, GT_7CLASS,
> > "PROC_UnReserveMemory: Failed to get DMM Mgr "
> > "handle: 0x%x\n", status);
> >- else
> >- status = DMM_UnReserveMemory(hDmmMgr, (u32) pRsvAddr);
> >+ goto func_end;
> >+ }
> >+
> >+ status = DMM_UnReserveMemory(hDmmMgr, (u32) pRsvAddr);
> >+ if (status != DSP_SOK)
> >+ goto func_end;
> >+
> >+ spin_lock(&pr_ctxt->dmm_rsv_lock);
> >+ list_for_each_entry_safe(rsv_obj, temp, &pr_ctxt->dmm_rsv_list, link)
>
> list_for_each_entry_safe is used when you delete a element from the list and continue but this is not the case. You should use list_for_each_entry instead, which has simpler logic and we can get ride of temp variable.
Thanks! V5 should take care of this :)
Cheers,
Ameya.
next prev parent reply other threads:[~2010-02-18 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 18:05 [PATCHv4 0/4] DSPBRIDGE: Improved reserved and mapped resource cleanup Ameya Palande
2010-02-17 18:05 ` [PATCHv4 1/4] DSPBRIDGE: Rename DMM_RES_OBJECT to DMM_MAP_OBJECT Ameya Palande
2010-02-17 18:05 ` [PATCHv4 2/4] DSPBRIDGE: New reserved memory accounting framework Ameya Palande
2010-02-18 1:40 ` Guzman Lugo, Fernando
2010-02-18 14:48 ` Ameya Palande [this message]
2010-02-17 18:05 ` [PATCHv4 3/4] DSPBRIDGE: Fix memory corruption in DRV_ProcFreeDMMRes Ameya Palande
2010-02-17 18:05 ` [PATCHv4 4/4] DSPBRIDGE: Improved mapped memory cleanup Ameya Palande
2010-02-18 1:52 ` Guzman Lugo, Fernando
2010-02-18 12:15 ` Ameya Palande
2010-02-18 14:27 ` Felipe Contreras
2010-02-18 14:47 ` Ameya Palande
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=1266504534.2105.13.camel@sanganak \
--to=ameya.palande@nokia.com \
--cc=deepak.chitriki@ti.com \
--cc=felipe.contreras@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=omar.ramirez@ti.com \
--cc=x0095840@ti.com \
/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