[POWERPC] Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc core changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
4288b92b96
commit
a7f67bdf2c
@@ -304,16 +304,15 @@ struct seq_operations cpuinfo_op = {
|
||||
void __init check_for_initrd(void)
|
||||
{
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
unsigned long *prop;
|
||||
const unsigned long *prop;
|
||||
|
||||
DBG(" -> check_for_initrd()\n");
|
||||
|
||||
if (of_chosen) {
|
||||
prop = (unsigned long *)get_property(of_chosen,
|
||||
"linux,initrd-start", NULL);
|
||||
prop = get_property(of_chosen, "linux,initrd-start", NULL);
|
||||
if (prop != NULL) {
|
||||
initrd_start = (unsigned long)__va(*prop);
|
||||
prop = (unsigned long *)get_property(of_chosen,
|
||||
prop = get_property(of_chosen,
|
||||
"linux,initrd-end", NULL);
|
||||
if (prop != NULL) {
|
||||
initrd_end = (unsigned long)__va(*prop);
|
||||
@@ -366,15 +365,14 @@ void __init smp_setup_cpu_maps(void)
|
||||
int cpu = 0;
|
||||
|
||||
while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
|
||||
int *intserv;
|
||||
const int *intserv;
|
||||
int j, len = sizeof(u32), nthreads = 1;
|
||||
|
||||
intserv = (int *)get_property(dn, "ibm,ppc-interrupt-server#s",
|
||||
&len);
|
||||
intserv = get_property(dn, "ibm,ppc-interrupt-server#s", &len);
|
||||
if (intserv)
|
||||
nthreads = len / sizeof(int);
|
||||
else {
|
||||
intserv = (int *) get_property(dn, "reg", NULL);
|
||||
intserv = get_property(dn, "reg", NULL);
|
||||
if (!intserv)
|
||||
intserv = &cpu; /* assume logical == phys */
|
||||
}
|
||||
@@ -395,13 +393,12 @@ void __init smp_setup_cpu_maps(void)
|
||||
if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR) &&
|
||||
(dn = of_find_node_by_path("/rtas"))) {
|
||||
int num_addr_cell, num_size_cell, maxcpus;
|
||||
unsigned int *ireg;
|
||||
const unsigned int *ireg;
|
||||
|
||||
num_addr_cell = prom_n_addr_cells(dn);
|
||||
num_size_cell = prom_n_size_cells(dn);
|
||||
|
||||
ireg = (unsigned int *)
|
||||
get_property(dn, "ibm,lrdr-capacity", NULL);
|
||||
ireg = get_property(dn, "ibm,lrdr-capacity", NULL);
|
||||
|
||||
if (!ireg)
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user