Title: [7855] trunk/arch/blackfin/mach-common/smp.c: Blackfin: Fix memset in smp_send_reschedule() and -stop()
- Revision
- 7855
- Author
- vapier
- Date
- 2009-11-21 13:42:01 -0500 (Sat, 21 Nov 2009)
Log Message
Blackfin: Fix memset in smp_send_reschedule() and -stop()
From: Roel Kluin <[email protected]>
To set zeroes the sizeof the struct should be used rather than sizeof the pointer, kzalloc does that.
Modified Paths
Diff
Modified: trunk/arch/blackfin/mach-common/smp.c (7854 => 7855)
--- trunk/arch/blackfin/mach-common/smp.c 2009-11-20 22:52:08 UTC (rev 7854)
+++ trunk/arch/blackfin/mach-common/smp.c 2009-11-21 18:42:01 UTC (rev 7855)
@@ -273,10 +273,9 @@
if (cpu_is_offline(cpu))
return;
- msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
+ msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
if (!msg)
return;
- memset(msg, 0, sizeof(msg));
INIT_LIST_HEAD(&msg->list);
msg->type = BFIN_IPI_RESCHEDULE;
@@ -302,10 +301,9 @@
if (cpus_empty(callmap))
return;
- msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
+ msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
if (!msg)
return;
- memset(msg, 0, sizeof(msg));
INIT_LIST_HEAD(&msg->list);
msg->type = BFIN_IPI_CPU_STOP;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits