Commit f96cb1f0 authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds
Browse files

[PATCH] IA64: convert kcalloc to kzalloc



This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dd392710
...@@ -431,7 +431,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev) ...@@ -431,7 +431,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
{ {
struct sysdata_el *element; struct sysdata_el *element;
element = kcalloc(1, sizeof(struct sysdata_el), GFP_KERNEL); element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL);
if (!element) { if (!element) {
dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__); dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
return; return;
......
...@@ -191,7 +191,7 @@ cx_device_register(nasid_t nasid, int part_num, int mfg_num, ...@@ -191,7 +191,7 @@ cx_device_register(nasid_t nasid, int part_num, int mfg_num,
{ {
struct cx_dev *cx_dev; struct cx_dev *cx_dev;
cx_dev = kcalloc(1, sizeof(struct cx_dev), GFP_KERNEL); cx_dev = kzalloc(sizeof(struct cx_dev), GFP_KERNEL);
DBG("cx_dev= 0x%p\n", cx_dev); DBG("cx_dev= 0x%p\n", cx_dev);
if (cx_dev == NULL) if (cx_dev == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -148,7 +148,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern) ...@@ -148,7 +148,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
tioca_kern->ca_pcigart_entries = tioca_kern->ca_pcigart_entries =
tioca_kern->ca_pciap_size / tioca_kern->ca_ap_pagesize; tioca_kern->ca_pciap_size / tioca_kern->ca_ap_pagesize;
tioca_kern->ca_pcigart_pagemap = tioca_kern->ca_pcigart_pagemap =
kcalloc(1, tioca_kern->ca_pcigart_entries / 8, GFP_KERNEL); kzalloc(tioca_kern->ca_pcigart_entries / 8, GFP_KERNEL);
if (!tioca_kern->ca_pcigart_pagemap) { if (!tioca_kern->ca_pcigart_pagemap) {
free_pages((unsigned long)tioca_kern->ca_gart, free_pages((unsigned long)tioca_kern->ca_gart,
get_order(tioca_kern->ca_gart_size)); get_order(tioca_kern->ca_gart_size));
...@@ -392,7 +392,7 @@ tioca_dma_mapped(struct pci_dev *pdev, uint64_t paddr, size_t req_size) ...@@ -392,7 +392,7 @@ tioca_dma_mapped(struct pci_dev *pdev, uint64_t paddr, size_t req_size)
* allocate a map struct * allocate a map struct
*/ */
ca_dmamap = kcalloc(1, sizeof(struct tioca_dmamap), GFP_ATOMIC); ca_dmamap = kzalloc(sizeof(struct tioca_dmamap), GFP_ATOMIC);
if (!ca_dmamap) if (!ca_dmamap)
goto map_return; goto map_return;
...@@ -600,7 +600,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont ...@@ -600,7 +600,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
* Allocate kernel bus soft and copy from prom. * Allocate kernel bus soft and copy from prom.
*/ */
tioca_common = kcalloc(1, sizeof(struct tioca_common), GFP_KERNEL); tioca_common = kzalloc(sizeof(struct tioca_common), GFP_KERNEL);
if (!tioca_common) if (!tioca_common)
return NULL; return NULL;
...@@ -609,7 +609,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont ...@@ -609,7 +609,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
/* init kernel-private area */ /* init kernel-private area */
tioca_kern = kcalloc(1, sizeof(struct tioca_kernel), GFP_KERNEL); tioca_kern = kzalloc(sizeof(struct tioca_kernel), GFP_KERNEL);
if (!tioca_kern) { if (!tioca_kern) {
kfree(tioca_common); kfree(tioca_common);
return NULL; return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment