m68k: replace kmalloc+memset with kzalloc
PATCH 1/1 m68k: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
arch/m68k/amiga/chipram.c +1 -2
@@ -52,10 +52,9 @@ void *amiga_chip_alloc(unsigned long siz#ifdef DEBUG printk ("amiga_chip_alloc: allocate %ld bytes\n" , size);#endif - res =kmalloc (sizeof (struct resource ),GFP_KERNEL ); + res =kzalloc (sizeof (struct resource ),GFP_KERNEL );if (!res)return NULL ; -memset (res,0 ,sizeof (struct resource )); res->name = name;if (allocate_resource (&chipram_res, res, size,0 ,UINT_MAX ,PAGE_SIZE ,NULL ,NULL ) <0 ) {
arch/m68k/atari/hades-pci.c +1 -2
@@ -375,10 +375,9 @@ struct pci_bus_info * __init init_hades_* Allocate memory for bus info structure. */ - bus =kmalloc (sizeof (struct pci_bus_info ),GFP_KERNEL ); + bus =kzalloc (sizeof (struct pci_bus_info ),GFP_KERNEL );if (!bus)return NULL ; -memset (bus,0 ,sizeof (struct pci_bus_info ));/* * Claim resources. The m68k has no separate I/O space, both
Quoted 3 lines · Yan Burman
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
Quoted 24 lines
diff -rubp
linux-2.6.19-rc5_orig/arch/m68k/amiga/chipram.clinux-2.6.19-rc5_kzalloc/arch/m68k/amiga/chipram.carch/m68k/amiga/chipram.c +1
-2@@ -52,10 +52,9 @@ void *amiga_chip_alloc(unsigned long siz#ifdef DEBUG printk ("amiga_chip_alloc: allocate %ld bytes\n" , size);#endif - res =kmalloc (sizeof (struct resource ),GFP_KERNEL ); + res =kzalloc (sizeof (struct resource ),GFP_KERNEL );if (!res)return NULL ; -memset (res,0 ,sizeof (struct resource )); res->name = name;if (allocate_resource (&chipram_res, res, size,0 ,UINT_MAX ,PAGE_SIZE ,NULL ,NULL ) <0 ) {diff -rubp
linux-2.6.19-rc5_orig/arch/m68k/atari/hades-pci.clinux-2.6.19-rc5_kzalloc/arch/m68k/atari/hades-pci.carch/m68k/atari/hades-pci.c +0
-0@@ -375,10 +375,9 @@ struct pci_bus_info * __init init_hades_* Allocate memory for bus info structure.
arch/m68k/atari/hades-pci.c struct pci_bus_info * __init init_hades_ · line 383
Quoted 10 lines
arch/m68k/atari/hades-pci.c +1
-2*/ - bus =kmalloc (sizeof (struct pci_bus_info ),GFP_KERNEL ); + bus =kzalloc (sizeof (struct pci_bus_info ),GFP_KERNEL );if (!bus)return NULL ; -memset (bus,0 ,sizeof (struct pci_bus_info ));/* * Claim resources. The m68k has no separate I/O space, both
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds