diff options
author | Rob Herring <robh@kernel.org> | 2014-04-02 00:49:03 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-04-30 01:59:15 -0400 |
commit | 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6 (patch) | |
tree | bb76a58e00f5aa436c51c1db9841e89ab102d004 /arch | |
parent | bba04d965d06abbbe10afd3687742389107e198e (diff) |
of/fdt: update of_get_flat_dt_prop in prep for libfdt
Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
call in preparation to convert FDT code to use libfdt. Make the return
value const and the property length ptr type an int.
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Stephen Chivers <schivers@csc.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/kernel/devtree.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/devtree.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/exynos.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/s5p-dev-mfc.c | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/prom.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/epapr_paravirt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/fadump.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 22 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/efika.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/setup.c | 2 |
16 files changed, 51 insertions, 49 deletions
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c index b6dc4e21fd32..0b3ef4025d89 100644 --- a/arch/arc/kernel/devtree.c +++ b/arch/arc/kernel/devtree.c | |||
@@ -42,7 +42,7 @@ const struct machine_desc * __init setup_machine_fdt(void *dt) | |||
42 | const struct machine_desc *mdesc; | 42 | const struct machine_desc *mdesc; |
43 | unsigned long dt_root; | 43 | unsigned long dt_root; |
44 | void *clk; | 44 | void *clk; |
45 | unsigned long len; | 45 | int len; |
46 | 46 | ||
47 | if (!early_init_dt_scan(dt)) | 47 | if (!early_init_dt_scan(dt)) |
48 | return NULL; | 48 | return NULL; |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index dff9cc0e9bd6..38f4711b4995 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -247,7 +247,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
247 | 247 | ||
248 | if (!mdesc) { | 248 | if (!mdesc) { |
249 | const char *prop; | 249 | const char *prop; |
250 | long size; | 250 | int size; |
251 | unsigned long dt_root; | 251 | unsigned long dt_root; |
252 | 252 | ||
253 | early_print("\nError: unrecognized/unsupported " | 253 | early_print("\nError: unrecognized/unsupported " |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index b32a907d021d..77293d39dfc9 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
@@ -250,7 +250,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, | |||
250 | { | 250 | { |
251 | struct map_desc iodesc; | 251 | struct map_desc iodesc; |
252 | __be32 *reg; | 252 | __be32 *reg; |
253 | unsigned long len; | 253 | int len; |
254 | 254 | ||
255 | if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && | 255 | if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && |
256 | !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock")) | 256 | !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock")) |
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index 993c9ae5dc5e..b4a5f0d8390d 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -53,7 +53,7 @@ static int __init vexpress_dt_find_scu(unsigned long node, | |||
53 | { | 53 | { |
54 | if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) { | 54 | if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) { |
55 | phys_addr_t phys_addr; | 55 | phys_addr_t phys_addr; |
56 | __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL); | 56 | const __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL); |
57 | 57 | ||
58 | if (WARN_ON(!reg)) | 58 | if (WARN_ON(!reg)) |
59 | return -EINVAL; | 59 | return -EINVAL; |
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c index 98087b655df0..469b86260fe3 100644 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c | |||
@@ -125,8 +125,8 @@ device_initcall(s5p_mfc_memory_init); | |||
125 | int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, | 125 | int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, |
126 | int depth, void *data) | 126 | int depth, void *data) |
127 | { | 127 | { |
128 | __be32 *prop; | 128 | const __be32 *prop; |
129 | unsigned long len; | 129 | int len; |
130 | struct s5p_mfc_dt_meminfo mfc_mem; | 130 | struct s5p_mfc_dt_meminfo mfc_mem; |
131 | 131 | ||
132 | if (!data) | 132 | if (!data) |
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index abdfb10e7eca..c76630603058 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -43,13 +43,13 @@ | |||
43 | #include <asm/pci-bridge.h> | 43 | #include <asm/pci-bridge.h> |
44 | 44 | ||
45 | #ifdef CONFIG_EARLY_PRINTK | 45 | #ifdef CONFIG_EARLY_PRINTK |
46 | static char *stdout; | 46 | static const char *stdout; |
47 | 47 | ||
48 | static int __init early_init_dt_scan_chosen_serial(unsigned long node, | 48 | static int __init early_init_dt_scan_chosen_serial(unsigned long node, |
49 | const char *uname, int depth, void *data) | 49 | const char *uname, int depth, void *data) |
50 | { | 50 | { |
51 | unsigned long l; | 51 | int l; |
52 | char *p; | 52 | const char *p; |
53 | 53 | ||
54 | pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname); | 54 | pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname); |
55 | 55 | ||
@@ -80,7 +80,7 @@ static int __init early_init_dt_scan_chosen_serial(unsigned long node, | |||
80 | (strncmp(p, "xlnx,opb-uartlite", 17) == 0) || | 80 | (strncmp(p, "xlnx,opb-uartlite", 17) == 0) || |
81 | (strncmp(p, "xlnx,axi-uartlite", 17) == 0) || | 81 | (strncmp(p, "xlnx,axi-uartlite", 17) == 0) || |
82 | (strncmp(p, "xlnx,mdm", 8) == 0)) { | 82 | (strncmp(p, "xlnx,mdm", 8) == 0)) { |
83 | unsigned int *addrp; | 83 | const unsigned int *addrp; |
84 | 84 | ||
85 | *(u32 *)data = UARTLITE; | 85 | *(u32 *)data = UARTLITE; |
86 | 86 | ||
diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c index 7898be90f2dc..d64e92b22dd8 100644 --- a/arch/powerpc/kernel/epapr_paravirt.c +++ b/arch/powerpc/kernel/epapr_paravirt.c | |||
@@ -36,7 +36,7 @@ static int __init early_init_dt_scan_epapr(unsigned long node, | |||
36 | int depth, void *data) | 36 | int depth, void *data) |
37 | { | 37 | { |
38 | const u32 *insts; | 38 | const u32 *insts; |
39 | unsigned long len; | 39 | int len; |
40 | int i; | 40 | int i; |
41 | 41 | ||
42 | insts = of_get_flat_dt_prop(node, "hcall-instructions", &len); | 42 | insts = of_get_flat_dt_prop(node, "hcall-instructions", &len); |
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 2230fd0ca3e4..7213d930918d 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c | |||
@@ -55,9 +55,9 @@ int crash_mem_ranges; | |||
55 | int __init early_init_dt_scan_fw_dump(unsigned long node, | 55 | int __init early_init_dt_scan_fw_dump(unsigned long node, |
56 | const char *uname, int depth, void *data) | 56 | const char *uname, int depth, void *data) |
57 | { | 57 | { |
58 | __be32 *sections; | 58 | const __be32 *sections; |
59 | int i, num_sections; | 59 | int i, num_sections; |
60 | unsigned long size; | 60 | int size; |
61 | const int *token; | 61 | const int *token; |
62 | 62 | ||
63 | if (depth != 1 || strcmp(uname, "rtas") != 0) | 63 | if (depth != 1 || strcmp(uname, "rtas") != 0) |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index d65754935652..483273e5c3e0 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -163,7 +163,7 @@ static struct ibm_pa_feature { | |||
163 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, | 163 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static void __init scan_features(unsigned long node, unsigned char *ftrs, | 166 | static void __init scan_features(unsigned long node, const unsigned char *ftrs, |
167 | unsigned long tablelen, | 167 | unsigned long tablelen, |
168 | struct ibm_pa_feature *fp, | 168 | struct ibm_pa_feature *fp, |
169 | unsigned long ft_size) | 169 | unsigned long ft_size) |
@@ -202,8 +202,8 @@ static void __init scan_features(unsigned long node, unsigned char *ftrs, | |||
202 | 202 | ||
203 | static void __init check_cpu_pa_features(unsigned long node) | 203 | static void __init check_cpu_pa_features(unsigned long node) |
204 | { | 204 | { |
205 | unsigned char *pa_ftrs; | 205 | const unsigned char *pa_ftrs; |
206 | unsigned long tablelen; | 206 | int tablelen; |
207 | 207 | ||
208 | pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen); | 208 | pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen); |
209 | if (pa_ftrs == NULL) | 209 | if (pa_ftrs == NULL) |
@@ -216,7 +216,7 @@ static void __init check_cpu_pa_features(unsigned long node) | |||
216 | #ifdef CONFIG_PPC_STD_MMU_64 | 216 | #ifdef CONFIG_PPC_STD_MMU_64 |
217 | static void __init check_cpu_slb_size(unsigned long node) | 217 | static void __init check_cpu_slb_size(unsigned long node) |
218 | { | 218 | { |
219 | __be32 *slb_size_ptr; | 219 | const __be32 *slb_size_ptr; |
220 | 220 | ||
221 | slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL); | 221 | slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL); |
222 | if (slb_size_ptr != NULL) { | 222 | if (slb_size_ptr != NULL) { |
@@ -257,7 +257,7 @@ static struct feature_property { | |||
257 | static inline void identical_pvr_fixup(unsigned long node) | 257 | static inline void identical_pvr_fixup(unsigned long node) |
258 | { | 258 | { |
259 | unsigned int pvr; | 259 | unsigned int pvr; |
260 | char *model = of_get_flat_dt_prop(node, "model", NULL); | 260 | const char *model = of_get_flat_dt_prop(node, "model", NULL); |
261 | 261 | ||
262 | /* | 262 | /* |
263 | * Since 440GR(x)/440EP(x) processors have the same pvr, | 263 | * Since 440GR(x)/440EP(x) processors have the same pvr, |
@@ -295,11 +295,11 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
295 | const char *uname, int depth, | 295 | const char *uname, int depth, |
296 | void *data) | 296 | void *data) |
297 | { | 297 | { |
298 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 298 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
299 | const __be32 *prop; | 299 | const __be32 *prop; |
300 | const __be32 *intserv; | 300 | const __be32 *intserv; |
301 | int i, nthreads; | 301 | int i, nthreads; |
302 | unsigned long len; | 302 | int len; |
303 | int found = -1; | 303 | int found = -1; |
304 | int found_thread = 0; | 304 | int found_thread = 0; |
305 | 305 | ||
@@ -392,7 +392,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
392 | int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname, | 392 | int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname, |
393 | int depth, void *data) | 393 | int depth, void *data) |
394 | { | 394 | { |
395 | unsigned long *lprop; /* All these set by kernel, so no need to convert endian */ | 395 | const unsigned long *lprop; /* All these set by kernel, so no need to convert endian */ |
396 | 396 | ||
397 | /* Use common scan routine to determine if this is the chosen node */ | 397 | /* Use common scan routine to determine if this is the chosen node */ |
398 | if (early_init_dt_scan_chosen(node, uname, depth, data) == 0) | 398 | if (early_init_dt_scan_chosen(node, uname, depth, data) == 0) |
@@ -443,8 +443,9 @@ int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname, | |||
443 | */ | 443 | */ |
444 | static int __init early_init_dt_scan_drconf_memory(unsigned long node) | 444 | static int __init early_init_dt_scan_drconf_memory(unsigned long node) |
445 | { | 445 | { |
446 | __be32 *dm, *ls, *usm; | 446 | const __be32 *dm, *ls, *usm; |
447 | unsigned long l, n, flags; | 447 | int l; |
448 | unsigned long n, flags; | ||
448 | u64 base, size, memblock_size; | 449 | u64 base, size, memblock_size; |
449 | unsigned int is_kexec_kdump = 0, rngs; | 450 | unsigned int is_kexec_kdump = 0, rngs; |
450 | 451 | ||
@@ -564,7 +565,8 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
564 | 565 | ||
565 | static void __init early_reserve_mem_dt(void) | 566 | static void __init early_reserve_mem_dt(void) |
566 | { | 567 | { |
567 | unsigned long i, len, dt_root; | 568 | unsigned long i, dt_root; |
569 | int len; | ||
568 | const __be32 *prop; | 570 | const __be32 *prop; |
569 | 571 | ||
570 | early_init_fdt_scan_reserved_mem(); | 572 | early_init_fdt_scan_reserved_mem(); |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 8cd5ed049b5d..8b4c857c1421 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -1142,7 +1142,7 @@ void __init rtas_initialize(void) | |||
1142 | int __init early_init_dt_scan_rtas(unsigned long node, | 1142 | int __init early_init_dt_scan_rtas(unsigned long node, |
1143 | const char *uname, int depth, void *data) | 1143 | const char *uname, int depth, void *data) |
1144 | { | 1144 | { |
1145 | u32 *basep, *entryp, *sizep; | 1145 | const u32 *basep, *entryp, *sizep; |
1146 | 1146 | ||
1147 | if (depth != 1 || strcmp(uname, "rtas") != 0) | 1147 | if (depth != 1 || strcmp(uname, "rtas") != 0) |
1148 | return 0; | 1148 | return 0; |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index d766d6ee33fe..59cc19a23a7a 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -265,9 +265,9 @@ static int __init htab_dt_scan_seg_sizes(unsigned long node, | |||
265 | const char *uname, int depth, | 265 | const char *uname, int depth, |
266 | void *data) | 266 | void *data) |
267 | { | 267 | { |
268 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 268 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
269 | __be32 *prop; | 269 | const __be32 *prop; |
270 | unsigned long size = 0; | 270 | int size = 0; |
271 | 271 | ||
272 | /* We are scanning "cpu" nodes only */ | 272 | /* We are scanning "cpu" nodes only */ |
273 | if (type == NULL || strcmp(type, "cpu") != 0) | 273 | if (type == NULL || strcmp(type, "cpu") != 0) |
@@ -320,9 +320,9 @@ static int __init htab_dt_scan_page_sizes(unsigned long node, | |||
320 | const char *uname, int depth, | 320 | const char *uname, int depth, |
321 | void *data) | 321 | void *data) |
322 | { | 322 | { |
323 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 323 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
324 | __be32 *prop; | 324 | const __be32 *prop; |
325 | unsigned long size = 0; | 325 | int size = 0; |
326 | 326 | ||
327 | /* We are scanning "cpu" nodes only */ | 327 | /* We are scanning "cpu" nodes only */ |
328 | if (type == NULL || strcmp(type, "cpu") != 0) | 328 | if (type == NULL || strcmp(type, "cpu") != 0) |
@@ -402,9 +402,9 @@ static int __init htab_dt_scan_page_sizes(unsigned long node, | |||
402 | static int __init htab_dt_scan_hugepage_blocks(unsigned long node, | 402 | static int __init htab_dt_scan_hugepage_blocks(unsigned long node, |
403 | const char *uname, int depth, | 403 | const char *uname, int depth, |
404 | void *data) { | 404 | void *data) { |
405 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 405 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
406 | __be64 *addr_prop; | 406 | const __be64 *addr_prop; |
407 | __be32 *page_count_prop; | 407 | const __be32 *page_count_prop; |
408 | unsigned int expected_pages; | 408 | unsigned int expected_pages; |
409 | long unsigned int phys_addr; | 409 | long unsigned int phys_addr; |
410 | long unsigned int block_size; | 410 | long unsigned int block_size; |
@@ -546,8 +546,8 @@ static int __init htab_dt_scan_pftsize(unsigned long node, | |||
546 | const char *uname, int depth, | 546 | const char *uname, int depth, |
547 | void *data) | 547 | void *data) |
548 | { | 548 | { |
549 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 549 | const char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
550 | __be32 *prop; | 550 | const __be32 *prop; |
551 | 551 | ||
552 | /* We are scanning "cpu" nodes only */ | 552 | /* We are scanning "cpu" nodes only */ |
553 | if (type == NULL || strcmp(type, "cpu") != 0) | 553 | if (type == NULL || strcmp(type, "cpu") != 0) |
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 18c104820198..6e19b0ad5d26 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -199,8 +199,8 @@ static void __init efika_setup_arch(void) | |||
199 | 199 | ||
200 | static int __init efika_probe(void) | 200 | static int __init efika_probe(void) |
201 | { | 201 | { |
202 | char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), | 202 | const char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), |
203 | "model", NULL); | 203 | "model", NULL); |
204 | 204 | ||
205 | if (model == NULL) | 205 | if (model == NULL) |
206 | return 0; | 206 | return 0; |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index c665d7de6c99..7044fd36197b 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -574,8 +574,8 @@ chrp_init2(void) | |||
574 | 574 | ||
575 | static int __init chrp_probe(void) | 575 | static int __init chrp_probe(void) |
576 | { | 576 | { |
577 | char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(), | 577 | const char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(), |
578 | "device_type", NULL); | 578 | "device_type", NULL); |
579 | if (dtype == NULL) | 579 | if (dtype == NULL) |
580 | return 0; | 580 | return 0; |
581 | if (strcmp(dtype, "chrp")) | 581 | if (strcmp(dtype, "chrp")) |
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 49d2f00019e5..c1329846bfa3 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
@@ -61,7 +61,7 @@ int __init early_init_dt_scan_opal(unsigned long node, | |||
61 | const char *uname, int depth, void *data) | 61 | const char *uname, int depth, void *data) |
62 | { | 62 | { |
63 | const void *basep, *entryp, *sizep; | 63 | const void *basep, *entryp, *sizep; |
64 | unsigned long basesz, entrysz, runtimesz; | 64 | int basesz, entrysz, runtimesz; |
65 | 65 | ||
66 | if (depth != 1 || strcmp(uname, "ibm,opal") != 0) | 66 | if (depth != 1 || strcmp(uname, "ibm,opal") != 0) |
67 | return 0; | 67 | return 0; |
@@ -77,11 +77,11 @@ int __init early_init_dt_scan_opal(unsigned long node, | |||
77 | opal.entry = of_read_number(entryp, entrysz/4); | 77 | opal.entry = of_read_number(entryp, entrysz/4); |
78 | opal.size = of_read_number(sizep, runtimesz/4); | 78 | opal.size = of_read_number(sizep, runtimesz/4); |
79 | 79 | ||
80 | pr_debug("OPAL Base = 0x%llx (basep=%p basesz=%ld)\n", | 80 | pr_debug("OPAL Base = 0x%llx (basep=%p basesz=%d)\n", |
81 | opal.base, basep, basesz); | 81 | opal.base, basep, basesz); |
82 | pr_debug("OPAL Entry = 0x%llx (entryp=%p basesz=%ld)\n", | 82 | pr_debug("OPAL Entry = 0x%llx (entryp=%p basesz=%d)\n", |
83 | opal.entry, entryp, entrysz); | 83 | opal.entry, entryp, entrysz); |
84 | pr_debug("OPAL Entry = 0x%llx (sizep=%p runtimesz=%ld)\n", | 84 | pr_debug("OPAL Entry = 0x%llx (sizep=%p runtimesz=%d)\n", |
85 | opal.size, sizep, runtimesz); | 85 | opal.size, sizep, runtimesz); |
86 | 86 | ||
87 | powerpc_firmware_features |= FW_FEATURE_OPAL; | 87 | powerpc_firmware_features |= FW_FEATURE_OPAL; |
@@ -102,7 +102,7 @@ int __init early_init_dt_scan_opal(unsigned long node, | |||
102 | int __init early_init_dt_scan_recoverable_ranges(unsigned long node, | 102 | int __init early_init_dt_scan_recoverable_ranges(unsigned long node, |
103 | const char *uname, int depth, void *data) | 103 | const char *uname, int depth, void *data) |
104 | { | 104 | { |
105 | unsigned long i, psize, size; | 105 | int i, psize, size; |
106 | const __be32 *prop; | 106 | const __be32 *prop; |
107 | 107 | ||
108 | if (depth != 1 || strcmp(uname, "ibm,opal") != 0) | 108 | if (depth != 1 || strcmp(uname, "ibm,opal") != 0) |
@@ -359,7 +359,7 @@ int opal_get_chars(uint32_t vtermno, char *buf, int count) | |||
359 | if ((be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_INPUT) == 0) | 359 | if ((be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_INPUT) == 0) |
360 | return 0; | 360 | return 0; |
361 | len = cpu_to_be64(count); | 361 | len = cpu_to_be64(count); |
362 | rc = opal_console_read(vtermno, &len, buf); | 362 | rc = opal_console_read(vtermno, &len, buf); |
363 | if (rc == OPAL_SUCCESS) | 363 | if (rc == OPAL_SUCCESS) |
364 | return be64_to_cpu(len); | 364 | return be64_to_cpu(len); |
365 | return 0; | 365 | return 0; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 2db8cc691bf4..099d2df976a2 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -665,7 +665,7 @@ static int __init pseries_probe_fw_features(unsigned long node, | |||
665 | void *data) | 665 | void *data) |
666 | { | 666 | { |
667 | const char *prop; | 667 | const char *prop; |
668 | unsigned long len; | 668 | int len; |
669 | static int hypertas_found; | 669 | static int hypertas_found; |
670 | static int vec5_found; | 670 | static int vec5_found; |
671 | 671 | ||
@@ -698,7 +698,7 @@ static int __init pseries_probe_fw_features(unsigned long node, | |||
698 | static int __init pSeries_probe(void) | 698 | static int __init pSeries_probe(void) |
699 | { | 699 | { |
700 | unsigned long root = of_get_flat_dt_root(); | 700 | unsigned long root = of_get_flat_dt_root(); |
701 | char *dtype = of_get_flat_dt_prop(root, "device_type", NULL); | 701 | const char *dtype = of_get_flat_dt_prop(root, "device_type", NULL); |
702 | 702 | ||
703 | if (dtype == NULL) | 703 | if (dtype == NULL) |
704 | return 0; | 704 | return 0; |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 89986e55d594..1991a3d0b2f8 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -220,7 +220,7 @@ static int __init xtensa_dt_io_area(unsigned long node, const char *uname, | |||
220 | int depth, void *data) | 220 | int depth, void *data) |
221 | { | 221 | { |
222 | const __be32 *ranges; | 222 | const __be32 *ranges; |
223 | unsigned long len; | 223 | int len; |
224 | 224 | ||
225 | if (depth > 1) | 225 | if (depth > 1) |
226 | return 0; | 226 | return 0; |