]> err.no Git - linux-2.6/commitdiff
[PATCH] PCI: convert kcalloc to kzalloc
authorPekka Enberg <penberg@cs.helsinki.fi>
Thu, 22 Sep 2005 07:48:11 +0000 (00:48 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 22 Sep 2005 14:58:24 +0000 (07:58 -0700)
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pci/hotplug/sgi_hotplug.c
drivers/pci/pci-sysfs.c

index b1409441c1cde52a605e6daf4e6d40ec173e5e52..a32ae82e59220b22a8cd305b69eed2971024a55e 100644 (file)
@@ -159,7 +159,7 @@ static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot,
 
        pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus);
 
-       slot = kcalloc(1, sizeof(*slot), GFP_KERNEL);
+       slot = kzalloc(sizeof(*slot), GFP_KERNEL);
        if (!slot)
                return -ENOMEM;
        bss_hotplug_slot->private = slot;
@@ -491,7 +491,7 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus)
                if (sn_pci_slot_valid(pci_bus, device) != 1)
                        continue;
 
-               bss_hotplug_slot = kcalloc(1, sizeof(*bss_hotplug_slot),
+               bss_hotplug_slot = kzalloc(sizeof(*bss_hotplug_slot),
                                           GFP_KERNEL);
                if (!bss_hotplug_slot) {
                        rc = -ENOMEM;
@@ -499,7 +499,7 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus)
                }
 
                bss_hotplug_slot->info =
-                       kcalloc(1, sizeof(struct hotplug_slot_info),
+                       kzalloc(sizeof(struct hotplug_slot_info),
                                GFP_KERNEL);
                if (!bss_hotplug_slot->info) {
                        rc = -ENOMEM;
index 56a3b397efee217736b1ce54d6f7621619cb04f4..2898830c496fca15ae10e77ea09d2b4839a20d0c 100644 (file)
@@ -360,7 +360,7 @@ pci_create_resource_files(struct pci_dev *pdev)
                        continue;
 
                /* allocate attribute structure, piggyback attribute name */
-               res_attr = kcalloc(1, sizeof(*res_attr) + 10, GFP_ATOMIC);
+               res_attr = kzalloc(sizeof(*res_attr) + 10, GFP_ATOMIC);
                if (res_attr) {
                        char *res_attr_name = (char *)(res_attr + 1);