Skip to content

Commit

Permalink
[PATCH] PCI: convert kcalloc to kzalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pekka Enberg authored and Linus Torvalds committed Sep 22, 2005
1 parent 1029d6b commit 656da9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/pci/hotplug/sgi_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -491,15 +491,15 @@ 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;
goto alloc_err;
}

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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 656da9d

Please sign in to comment.