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>
This commit is contained in:
parent
46b60faf8c
commit
05bad36ce7
|
@ -276,10 +276,9 @@ void smp_send_reschedule(int cpu)
|
||||||
if (cpu_is_offline(cpu))
|
if (cpu_is_offline(cpu))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return;
|
return;
|
||||||
memset(msg, 0, sizeof(msg));
|
|
||||||
INIT_LIST_HEAD(&msg->list);
|
INIT_LIST_HEAD(&msg->list);
|
||||||
msg->type = BFIN_IPI_RESCHEDULE;
|
msg->type = BFIN_IPI_RESCHEDULE;
|
||||||
|
|
||||||
|
@ -305,10 +304,9 @@ void smp_send_stop(void)
|
||||||
if (cpus_empty(callmap))
|
if (cpus_empty(callmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
|
msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return;
|
return;
|
||||||
memset(msg, 0, sizeof(msg));
|
|
||||||
INIT_LIST_HEAD(&msg->list);
|
INIT_LIST_HEAD(&msg->list);
|
||||||
msg->type = BFIN_IPI_CPU_STOP;
|
msg->type = BFIN_IPI_CPU_STOP;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue