From: Roel Kluin Date: Sat, 21 Nov 2009 18:35:58 +0000 (+0100) Subject: Blackfin: fix memset in smp_send_reschedule() and -stop() X-Git-Tag: upstream/snapshot3+hdmi~16512^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05bad36ce7a29e1e5eaf5f730ef004effed3add4;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Blackfin: fix memset in smp_send_reschedule() and -stop() To set zeroes the sizeof the struct should be used rather than sizeof the pointer, kzalloc does that. Signed-off-by: Roel Kluin Signed-off-by: Mike Frysinger --- diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index d98585f..d92b168 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c @@ -276,10 +276,9 @@ void smp_send_reschedule(int cpu) 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; @@ -305,10 +304,9 @@ void smp_send_stop(void) 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;