From patchwork Tue Feb 16 15:40:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 79685 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1GFg6gI018749 for ; Tue, 16 Feb 2010 15:42:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932719Ab0BPPls (ORCPT ); Tue, 16 Feb 2010 10:41:48 -0500 Received: from smtp.nokia.com ([192.100.105.134]:48778 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932588Ab0BPPlq (ORCPT ); Tue, 16 Feb 2010 10:41:46 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1GFexwx006926 for ; Tue, 16 Feb 2010 09:41:44 -0600 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Feb 2010 17:41:08 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Feb 2010 17:41:04 +0200 Received: from localhost.localdomain (esdhcp040168.research.nokia.com [172.21.40.168]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1GFf23D028515 for ; Tue, 16 Feb 2010 17:41:02 +0200 From: Ameya Palande To: linux-omap@vger.kernel.org Subject: [PATCH] DSPBRIDGE: Get rid of memset() from MEM_Calloc() Date: Tue, 16 Feb 2010 17:40:23 +0200 Message-Id: X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 16 Feb 2010 15:41:05.0077 (UTC) FILETIME=[733D7E50:01CAAF1E] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 16 Feb 2010 15:42:06 +0000 (UTC) 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,