Am 06.07.2007 18:51 schrieb Yoann Padioleau:@@
expression E1,E2,E3;
@@
- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)
This misses the semantic distinction between the first and second
arguments of kcalloc(). The first argument is supposed to be the
number of elements to allocate and the second their size. As a
consequence, the following hunks in your pathc are wrong:
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/ pci.c
index 9d63d7f..b84955f 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -1002,11 +1002,10 @@ int iop13xx_pci_setup(int nr, struct pci
if (nr > 1)
return 0;
- res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL);
+ res = kcalloc(sizeof(struct resource), 2, GFP_KERNEL);
if (!res)
panic("PCI: unable to alloc resources");
- memset(res, 0, sizeof(struct resource) * 2);
/* 'nr' assumptions:
* ATUX is always 0