linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c
@ 2007-05-08 10:45 Shani Moideen
  2007-05-08 11:18 ` Andy Whitcroft
  0 siblings, 1 reply; 2+ messages in thread
From: Shani Moideen @ 2007-05-08 10:45 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, kernel-janitors

Hi,

Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
----

thanks.


diff --git a/mm/memory.c b/mm/memory.c
index e7066e7..2780d07 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1505,7 +1505,7 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
                 * zeroes.
                 */
                if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
-                       memset(kaddr, 0, PAGE_SIZE);
+                       clear_page(kaddr);
                kunmap_atomic(kaddr, KM_USER0);
                flush_dcache_page(dst);
                return;


-- 
Shani 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c
  2007-05-08 10:45 [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c Shani Moideen
@ 2007-05-08 11:18 ` Andy Whitcroft
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Whitcroft @ 2007-05-08 11:18 UTC (permalink / raw)
  To: Shani Moideen; +Cc: linux-mm, linux-kernel, kernel-janitors

Shani Moideen wrote:
> Hi,
> 
> Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c.
> 
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
> ----
> 
> thanks.
> 
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index e7066e7..2780d07 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1505,7 +1505,7 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
>                  * zeroes.
>                  */
>                 if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
> -                       memset(kaddr, 0, PAGE_SIZE);
> +                       clear_page(kaddr);
>                 kunmap_atomic(kaddr, KM_USER0);
>                 flush_dcache_page(dst);
>                 return;
> 
> 

This looks to be whitespace dammaged?

-apw

use tabs not spaces
PATCH: -:64:
FILE: b/mm/memory.c:1508:
+                       clear_page(kaddr);$

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2007-05-08 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-08 10:45 [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in mm/memory.c Shani Moideen
2007-05-08 11:18 ` Andy Whitcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox