All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] Use kzalloc
@ 2006-08-03 20:47 tom_hisch
  2006-08-03 21:12 ` Nishanth Aravamudan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tom_hisch @ 2006-08-03 20:47 UTC (permalink / raw)
  To: kernel-janitors

From: Thomas Hisch <t.hisch@gmail.com>

use kzalloc in include/asm-i386/thread_info.h instead of kmalloc + memset

Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
---
 include/asm-i386/thread_info.h |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
index 54d6d7a..a8f37f2 100644
--- a/include/asm-i386/thread_info.h
+++ b/include/asm-i386/thread_info.h
@@ -32,7 +32,6 @@ struct thread_info {
 	__u32			cpu;		/* current CPU */
 	int			preempt_count;	/* 0 => preemptable, <0 => BUG */
 
-
 	mm_segment_t		addr_limit;	/* thread address space:
 					 	   0-0xBFFFFFFF for user-thead
 						   0-0xFFFFFFFF for kernel-thread
@@ -99,9 +98,7 @@ #define alloc_thread_info(tsk)					\
 	({							\
 		struct thread_info *ret;			\
 								\
-		ret = kmalloc(THREAD_SIZE, GFP_KERNEL);		\
-		if (ret)					\
-			memset(ret, 0, THREAD_SIZE);		\
+		ret = kzalloc(THREAD_SIZE, GFP_KERNEL);		\
 		ret;						\
 	})
 #else
-- 
1.4.2.rc1.gbc9e-dirty



_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2006-08-13 11:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 20:47 [KJ] [PATCH] Use kzalloc tom_hisch
2006-08-03 21:12 ` Nishanth Aravamudan
2006-08-03 21:29 ` Bernd Petrovitsch
2006-08-07 10:50 ` tom_hisch
2006-08-07 11:45 ` walter harms
2006-08-13 11:00 ` tom hisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.