* [PATCH] DSPBRIDGE: Get rid of memset() from MEM_Calloc()
@ 2010-02-16 15:40 Ameya Palande
2010-02-23 16:23 ` Omar Ramirez Luna
0 siblings, 1 reply; 2+ messages in thread
From: Ameya Palande @ 2010-02-16 15:40 UTC (permalink / raw)
To: linux-omap
Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
---
drivers/dsp/bridge/services/mem.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c
index 614396e..2501eee 100644
--- a/drivers/dsp/bridge/services/mem.c
+++ b/drivers/dsp/bridge/services/mem.c
@@ -227,16 +227,13 @@ void *MEM_Calloc(u32 cBytes, enum MEM_POOLATTRS type)
case MEM_NONPAGED:
/* If non-paged memory required, see note at top of file. */
case MEM_PAGED:
- pMem = kmalloc(cBytes,
+ pMem = kzalloc(cBytes,
(in_atomic()) ? GFP_ATOMIC : GFP_KERNEL);
- if (pMem)
- memset(pMem, 0, cBytes);
-
break;
case MEM_LARGEVIRTMEM:
- pMem = vmalloc(cBytes);
- if (pMem)
- memset(pMem, 0, cBytes);
+ pMem = __vmalloc(cBytes,
+ GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
+ PAGE_KERNEL);
break;
default:
GT_1trace(MEM_debugMask, GT_6CLASS,
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] DSPBRIDGE: Get rid of memset() from MEM_Calloc()
2010-02-16 15:40 [PATCH] DSPBRIDGE: Get rid of memset() from MEM_Calloc() Ameya Palande
@ 2010-02-23 16:23 ` Omar Ramirez Luna
0 siblings, 0 replies; 2+ messages in thread
From: Omar Ramirez Luna @ 2010-02-23 16:23 UTC (permalink / raw)
To: Ameya Palande; +Cc: linux-omap@vger.kernel.org
On 2/16/2010 9:40 AM, Ameya Palande wrote:
> Signed-off-by: Ameya Palande<ameya.palande@nokia.com>
> ---
> drivers/dsp/bridge/services/mem.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c
> index 614396e..2501eee 100644
> --- a/drivers/dsp/bridge/services/mem.c
> +++ b/drivers/dsp/bridge/services/mem.c
> @@ -227,16 +227,13 @@ void *MEM_Calloc(u32 cBytes, enum MEM_POOLATTRS type)
> case MEM_NONPAGED:
> /* If non-paged memory required, see note at top of file. */
> case MEM_PAGED:
> - pMem = kmalloc(cBytes,
> + pMem = kzalloc(cBytes,
> (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL);
> - if (pMem)
> - memset(pMem, 0, cBytes);
> -
> break;
> case MEM_LARGEVIRTMEM:
> - pMem = vmalloc(cBytes);
> - if (pMem)
> - memset(pMem, 0, cBytes);
> + pMem = __vmalloc(cBytes,
> + GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
> + PAGE_KERNEL);
> break;
> default:
> GT_1trace(MEM_debugMask, GT_6CLASS,
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Pushed to dspbridge
- omar
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-23 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 15:40 [PATCH] DSPBRIDGE: Get rid of memset() from MEM_Calloc() Ameya Palande
2010-02-23 16:23 ` Omar Ramirez Luna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox