RE: [PATCHv4 2/4] DSPBRIDGE: New reserved memory accounting framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx]
> >Sent: Wednesday, February 17, 2010 12:06 PM
> >To: linux-omap@xxxxxxxxxxxxxxx
> >Cc: felipe.contreras@xxxxxxxxx; 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@xxxxxxxxx>
> >---
> >@@ -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.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux