Skip to content

Commit 1a38147

Browse files
sfrothwellpaulusmack
authored andcommitted
[POWERPC] Make struct property's value a void *
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent 9213fee commit 1a38147

9 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎arch/powerpc/kernel/machine_kexec_64.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,19 @@ static unsigned long htab_base, kernel_end;
294294
static struct property htab_base_prop = {
295295
.name = "linux,htab-base",
296296
.length = sizeof(unsigned long),
297-
.value = (unsigned char *)&htab_base,
297+
.value = &htab_base,
298298
};
299299

300300
static struct property htab_size_prop = {
301301
.name = "linux,htab-size",
302302
.length = sizeof(unsigned long),
303-
.value = (unsigned char *)&htab_size_bytes,
303+
.value = &htab_size_bytes,
304304
};
305305

306306
static struct property kernel_end_prop = {
307307
.name = "linux,kernel-end",
308308
.length = sizeof(unsigned long),
309-
.value = (unsigned char *)&kernel_end,
309+
.value = &kernel_end,
310310
};
311311

312312
static void __init export_htab_values(void)
@@ -335,15 +335,15 @@ static void __init export_htab_values(void)
335335
static struct property crashk_base_prop = {
336336
.name = "linux,crashkernel-base",
337337
.length = sizeof(unsigned long),
338-
.value = (unsigned char *)&crashk_res.start,
338+
.value = &crashk_res.start,
339339
};
340340

341341
static unsigned long crashk_size;
342342

343343
static struct property crashk_size_prop = {
344344
.name = "linux,crashkernel-size",
345345
.length = sizeof(unsigned long),
346-
.value = (unsigned char *)&crashk_size,
346+
.value = &crashk_size,
347347
};
348348

349349
static void __init export_crashk_values(void)

‎arch/powerpc/kernel/pci_32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ pci_create_OF_bus_map(void)
10121012
memset(of_prop, -1, sizeof(struct property) + 256);
10131013
of_prop->name = "pci-OF-bus-map";
10141014
of_prop->length = 256;
1015-
of_prop->value = (unsigned char *)&of_prop[1];
1015+
of_prop->value = &of_prop[1];
10161016
prom_add_property(find_path_device("/"), of_prop);
10171017
}
10181018
}

‎arch/powerpc/kernel/prom.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,13 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
390390
if (allnextpp) {
391391
pp->name = "name";
392392
pp->length = sz;
393-
pp->value = (unsigned char *)(pp + 1);
393+
pp->value = pp + 1;
394394
*prev_pp = pp;
395395
prev_pp = &pp->next;
396396
memcpy(pp->value, ps, sz - 1);
397397
((char *)pp->value)[sz - 1] = 0;
398-
DBG("fixed up name for %s -> %s\n", pathp, pp->value);
398+
DBG("fixed up name for %s -> %s\n", pathp,
399+
(char *)pp->value);
399400
}
400401
}
401402
if (allnextpp) {

‎arch/powerpc/platforms/maple/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
7777
bridge->full_name);
7878
return;
7979
}
80-
bus_range = (int *)prop->value;
80+
bus_range = prop->value;
8181
bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
8282
}
8383

‎arch/powerpc/platforms/powermac/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
100100
if (prop == NULL || prop->length < 2 * sizeof(int))
101101
return;
102102

103-
bus_range = (int *)prop->value;
103+
bus_range = prop->value;
104104
bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
105105
}
106106

‎arch/powerpc/platforms/powermac/pfunc_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
692692
name = pp->name + plen;
693693
if (strlen(name) && pp->length >= 12)
694694
count += pmf_add_function_prop(dev, driverdata, name,
695-
(u32 *)pp->value,
696-
pp->length);
695+
pp->value, pp->length);
697696
}
698697
return count;
699698
}

‎drivers/macintosh/smu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
952952
prop->name = ((char *)prop) + tlen - 18;
953953
sprintf(prop->name, "sdb-partition-%02x", id);
954954
prop->length = len;
955-
prop->value = (unsigned char *)hdr;
955+
prop->value = hdr;
956956
prop->next = NULL;
957957

958958
/* Read the datablock */

‎fs/proc/proc_devtree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static int property_read_proc(char *page, char **start, off_t off,
3838
n = count;
3939
else
4040
*eof = 1;
41-
memcpy(page, pp->value + off, n);
41+
memcpy(page, (char *)pp->value + off, n);
4242
*start = page;
4343
return n;
4444
}

‎include/asm-powerpc/prom.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ typedef u32 ihandle;
7171
struct property {
7272
char *name;
7373
int length;
74-
unsigned char *value;
74+
void *value;
7575
struct property *next;
7676
};
7777

0 commit comments

Comments
 (0)