Skip to content

Commit

Permalink
[POWERPC] Make struct property's value a void *
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Apr 12, 2007
1 parent 9213fee commit 1a38147
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/kernel/machine_kexec_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,19 +294,19 @@ static unsigned long htab_base, kernel_end;
static struct property htab_base_prop = {
.name = "linux,htab-base",
.length = sizeof(unsigned long),
.value = (unsigned char *)&htab_base,
.value = &htab_base,
};

static struct property htab_size_prop = {
.name = "linux,htab-size",
.length = sizeof(unsigned long),
.value = (unsigned char *)&htab_size_bytes,
.value = &htab_size_bytes,
};

static struct property kernel_end_prop = {
.name = "linux,kernel-end",
.length = sizeof(unsigned long),
.value = (unsigned char *)&kernel_end,
.value = &kernel_end,
};

static void __init export_htab_values(void)
Expand Down Expand Up @@ -335,15 +335,15 @@ static void __init export_htab_values(void)
static struct property crashk_base_prop = {
.name = "linux,crashkernel-base",
.length = sizeof(unsigned long),
.value = (unsigned char *)&crashk_res.start,
.value = &crashk_res.start,
};

static unsigned long crashk_size;

static struct property crashk_size_prop = {
.name = "linux,crashkernel-size",
.length = sizeof(unsigned long),
.value = (unsigned char *)&crashk_size,
.value = &crashk_size,
};

static void __init export_crashk_values(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ pci_create_OF_bus_map(void)
memset(of_prop, -1, sizeof(struct property) + 256);
of_prop->name = "pci-OF-bus-map";
of_prop->length = 256;
of_prop->value = (unsigned char *)&of_prop[1];
of_prop->value = &of_prop[1];
prom_add_property(find_path_device("/"), of_prop);
}
}
Expand Down
5 changes: 3 additions & 2 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,13 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
if (allnextpp) {
pp->name = "name";
pp->length = sz;
pp->value = (unsigned char *)(pp + 1);
pp->value = pp + 1;
*prev_pp = pp;
prev_pp = &pp->next;
memcpy(pp->value, ps, sz - 1);
((char *)pp->value)[sz - 1] = 0;
DBG("fixed up name for %s -> %s\n", pathp, pp->value);
DBG("fixed up name for %s -> %s\n", pathp,
(char *)pp->value);
}
}
if (allnextpp) {
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/maple/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
bridge->full_name);
return;
}
bus_range = (int *)prop->value;
bus_range = prop->value;
bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/powermac/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
if (prop == NULL || prop->length < 2 * sizeof(int))
return;

bus_range = (int *)prop->value;
bus_range = prop->value;
bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
}

Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/powermac/pfunc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
name = pp->name + plen;
if (strlen(name) && pp->length >= 12)
count += pmf_add_function_prop(dev, driverdata, name,
(u32 *)pp->value,
pp->length);
pp->value, pp->length);
}
return count;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
prop->name = ((char *)prop) + tlen - 18;
sprintf(prop->name, "sdb-partition-%02x", id);
prop->length = len;
prop->value = (unsigned char *)hdr;
prop->value = hdr;
prop->next = NULL;

/* Read the datablock */
Expand Down
2 changes: 1 addition & 1 deletion fs/proc/proc_devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static int property_read_proc(char *page, char **start, off_t off,
n = count;
else
*eof = 1;
memcpy(page, pp->value + off, n);
memcpy(page, (char *)pp->value + off, n);
*start = page;
return n;
}
Expand Down
2 changes: 1 addition & 1 deletion include/asm-powerpc/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ typedef u32 ihandle;
struct property {
char *name;
int length;
unsigned char *value;
void *value;
struct property *next;
};

Expand Down

0 comments on commit 1a38147

Please sign in to comment.