Title: [6855] trunk/arch/blackfin/kernel/module.c: module: convert malloc()/memset() to zalloc()
- Revision
- 6855
- Author
- vapier
- Date
- 2009-06-25 19:37:40 -0500 (Thu, 25 Jun 2009)
Log Message
module: convert malloc()/memset() to zalloc()
Modified Paths
Diff
Modified: trunk/arch/blackfin/kernel/module.c (6854 => 6855)
--- trunk/arch/blackfin/kernel/module.c 2009-06-26 00:36:12 UTC (rev 6854)
+++ trunk/arch/blackfin/kernel/module.c 2009-06-26 00:37:40 UTC (rev 6855)
@@ -98,14 +98,13 @@
if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 ||
((strcmp(".bss", secstrings + s->sh_name) == 0) &&
(hdr->e_flags & EF_BFIN_DATA_IN_L1) && (s->sh_size > 0))) {
- dest = l1_data_sram_alloc(s->sh_size);
+ dest = l1_data_sram_zalloc(s->sh_size);
mod->arch.bss_a_l1 = dest;
if (dest == NULL) {
pr_err("L1 data memory allocation failed\n",
mod->name);
return -1;
}
- memset(dest, 0, s->sh_size);
s->sh_flags &= ~SHF_ALLOC;
s->sh_addr = (unsigned long)dest;
}
@@ -164,14 +163,13 @@
if (strcmp(".l2.bss", secstrings + s->sh_name) == 0 ||
((strcmp(".bss", secstrings + s->sh_name) == 0) &&
(hdr->e_flags & EF_BFIN_DATA_IN_L2) && (s->sh_size > 0))) {
- dest = l2_sram_alloc(s->sh_size);
+ dest = l2_sram_zalloc(s->sh_size);
mod->arch.bss_l2 = dest;
if (dest == NULL) {
pr_err("L2 SRAM allocation failed\n",
mod->name);
return -1;
}
- memset(dest, 0, s->sh_size);
s->sh_flags &= ~SHF_ALLOC;
s->sh_addr = (unsigned long)dest;
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits