lkml.org 
[lkml]   [2005]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/8] PCI: convert kcalloc to kzalloc
From
Date
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---

hotplug/sgi_hotplug.c | 2 +-
pci-sysfs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Index: 2.6/drivers/pci/hotplug/sgi_hotplug.c
===================================================================
--- 2.6.orig/drivers/pci/hotplug/sgi_hotplug.c
+++ 2.6/drivers/pci/hotplug/sgi_hotplug.c
@@ -142,7 +142,7 @@ static int sn_hp_slot_private_alloc(stru

pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus);

- bss_hotplug_slot->private = kcalloc(1, sizeof(struct slot),
+ bss_hotplug_slot->private = kzalloc(sizeof(struct slot),
GFP_KERNEL);
if (!bss_hotplug_slot->private)
return -ENOMEM;
Index: 2.6/drivers/pci/pci-sysfs.c
===================================================================
--- 2.6.orig/drivers/pci/pci-sysfs.c
+++ 2.6/drivers/pci/pci-sysfs.c
@@ -356,7 +356,7 @@ pci_create_resource_files(struct pci_dev
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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-05 17:46    [W:3.122 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site