linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: Remove memset from coherent memory allocator (for
@ 2010-07-29 11:50 Andrew Murray
  2010-07-29 13:13 ` [PATCH] sh: Remove memset from coherent memory allocator (for comments) Matt Fleming
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Andrew Murray @ 2010-07-29 11:50 UTC (permalink / raw)
  To: linux-sh

From: Andrew Murray <amurray@mpc-data.co.uk>

This patch removes unnecessary memset in coherent memory allocator.

Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
---
--- linux-2.6-old/arch/sh/mm/consistent.c       2010-07-25
05:01:33.813493496 +0100
+++ linux-2.6/arch/sh/mm/consistent.c   2010-07-25 05:03:42.763055056 +0100
@@ -42,7 +42,6 @@ void *dma_generic_alloc_coherent(struct
        if (!ret)
                return NULL;

-       memset(ret, 0, size);
        /*
         * Pages from the page allocator may have data present in
         * cache. So flush the cache before using uncached memory.
@@ -141,7 +140,7 @@ int __init platform_resource_setup_memor
        if (!memsize)
                return 0;

-       buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL);
+       buf = dma_alloc_coherent(NULL, memsize, &dma_handle,
GFP_KERNEL | __GFP_ZERO);
        if (!buf) {
                pr_warning("%s: unable to allocate memory\n", name);
                return -ENOMEM;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-04  7:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 11:50 [PATCH] sh: Remove memset from coherent memory allocator (for Andrew Murray
2010-07-29 13:13 ` [PATCH] sh: Remove memset from coherent memory allocator (for comments) Matt Fleming
2010-07-29 14:03 ` [PATCH] sh: Remove memset from coherent memory allocator (for Andrew Murray
2010-07-29 19:36 ` Guennadi Liakhovetski
2010-07-29 19:52 ` [PATCH] sh: Remove memset from coherent memory allocator (for comments) Matt Fleming
2010-08-04  7:37 ` Paul Mundt
2010-08-04  7:53 ` [PATCH] sh: Remove memset from coherent memory allocator (for Andrew Murray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).