Commit 6b198ade authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: alloc_bootmem returns void *

As Andrew points out, there is no need for casts since alloc_bootmem
returns void*.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent deb93c6a
...@@ -325,7 +325,7 @@ static int __init add_bridge(struct device_node *dev) ...@@ -325,7 +325,7 @@ static int __init add_bridge(struct device_node *dev)
dev->full_name); dev->full_name);
} }
hose = (struct pci_controller *)alloc_bootmem(sizeof(struct pci_controller)); hose = alloc_bootmem(sizeof(struct pci_controller));
if (hose == NULL) if (hose == NULL)
return -ENOMEM; return -ENOMEM;
pci_setup_pci_controller(hose); pci_setup_pci_controller(hose);
...@@ -334,7 +334,7 @@ static int __init add_bridge(struct device_node *dev) ...@@ -334,7 +334,7 @@ static int __init add_bridge(struct device_node *dev)
hose->first_busno = bus_range ? bus_range[0] : 0; hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff; hose->last_busno = bus_range ? bus_range[1] : 0xff;
of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(hose->global_number)); sizeof(hose->global_number));
if (of_prop) { if (of_prop) {
memset(of_prop, 0, sizeof(struct property)); memset(of_prop, 0, sizeof(struct property));
......
...@@ -476,7 +476,7 @@ struct mpic * __init mpic_alloc(unsigned long phys_addr, ...@@ -476,7 +476,7 @@ struct mpic * __init mpic_alloc(unsigned long phys_addr,
const char *vers; const char *vers;
int i; int i;
mpic = (struct mpic *)alloc_bootmem(sizeof(struct mpic)); mpic = alloc_bootmem(sizeof(struct mpic));
if (mpic == NULL) if (mpic == NULL)
return NULL; return NULL;
......
...@@ -308,11 +308,11 @@ static struct pci_controller * __init alloc_phb(struct device_node *dev, ...@@ -308,11 +308,11 @@ static struct pci_controller * __init alloc_phb(struct device_node *dev,
struct pci_controller *phb; struct pci_controller *phb;
struct property *of_prop; struct property *of_prop;
phb = (struct pci_controller *)alloc_bootmem(sizeof(struct pci_controller)); phb = alloc_bootmem(sizeof(struct pci_controller));
if (phb == NULL) if (phb == NULL)
return NULL; return NULL;
of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(phb->global_number)); sizeof(phb->global_number));
if (!of_prop) if (!of_prop)
return NULL; return NULL;
......
...@@ -504,7 +504,7 @@ static void __init pmac_process_bridge_OF_ranges(struct pci_controller *hose, ...@@ -504,7 +504,7 @@ static void __init pmac_process_bridge_OF_ranges(struct pci_controller *hose,
dt_ranges = (unsigned int *) get_property(dev, "ranges", &rlen); dt_ranges = (unsigned int *) get_property(dev, "ranges", &rlen);
if (!dt_ranges) if (!dt_ranges)
return; return;
/* lc_ranges = (unsigned int *) alloc_bootmem(rlen);*/ /* lc_ranges = alloc_bootmem(rlen);*/
lc_ranges = static_lc_ranges; lc_ranges = static_lc_ranges;
if (!lc_ranges) if (!lc_ranges)
return; /* what can we do here ? */ return; /* what can we do here ? */
...@@ -614,7 +614,7 @@ static int __init add_bridge(struct device_node *dev) ...@@ -614,7 +614,7 @@ static int __init add_bridge(struct device_node *dev)
dev->full_name); dev->full_name);
} }
hose = (struct pci_controller *)alloc_bootmem(sizeof(struct pci_controller)); hose = alloc_bootmem(sizeof(struct pci_controller));
if (hose == NULL) if (hose == NULL)
return -ENOMEM; return -ENOMEM;
pci_setup_pci_controller(hose); pci_setup_pci_controller(hose);
...@@ -623,7 +623,7 @@ static int __init add_bridge(struct device_node *dev) ...@@ -623,7 +623,7 @@ static int __init add_bridge(struct device_node *dev)
hose->first_busno = bus_range ? bus_range[0] : 0; hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff; hose->last_busno = bus_range ? bus_range[1] : 0xff;
of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(hose->global_number)); sizeof(hose->global_number));
if (of_prop) { if (of_prop) {
memset(of_prop, 0, sizeof(struct property)); memset(of_prop, 0, sizeof(struct property));
......
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