diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-11-21 13:35:58 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-11-25 02:35:45 -0500 |
commit | 05bad36ce7a29e1e5eaf5f730ef004effed3add4 (patch) | |
tree | c27c12b0e838d92c4d5b6350e96a320ceae6d28b /arch/blackfin/mach-common | |
parent | 46b60faf8c68a200bbccbe5bc6e51c414145b9af (diff) |
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 <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index d98585f3237d..d92b168c8328 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) | |||
276 | if (cpu_is_offline(cpu)) | 276 | if (cpu_is_offline(cpu)) |
277 | return; | 277 | return; |
278 | 278 | ||
279 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 279 | msg = kzalloc(sizeof(*msg), GFP_ATOMIC); |
280 | if (!msg) | 280 | if (!msg) |
281 | return; | 281 | return; |
282 | memset(msg, 0, sizeof(msg)); | ||
283 | INIT_LIST_HEAD(&msg->list); | 282 | INIT_LIST_HEAD(&msg->list); |
284 | msg->type = BFIN_IPI_RESCHEDULE; | 283 | msg->type = BFIN_IPI_RESCHEDULE; |
285 | 284 | ||
@@ -305,10 +304,9 @@ void smp_send_stop(void) | |||
305 | if (cpus_empty(callmap)) | 304 | if (cpus_empty(callmap)) |
306 | return; | 305 | return; |
307 | 306 | ||
308 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 307 | msg = kzalloc(sizeof(*msg), GFP_ATOMIC); |
309 | if (!msg) | 308 | if (!msg) |
310 | return; | 309 | return; |
311 | memset(msg, 0, sizeof(msg)); | ||
312 | INIT_LIST_HEAD(&msg->list); | 310 | INIT_LIST_HEAD(&msg->list); |
313 | msg->type = BFIN_IPI_CPU_STOP; | 311 | msg->type = BFIN_IPI_CPU_STOP; |
314 | 312 | ||