Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51001775 authored by Rob Herring's avatar Rob Herring Committed by Joonwoo Park
Browse files

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: default avatarRob Herring <robh@kernel.org>
Tested-by: default avatarMichal Simek <michal.simek@xilinx.com>
Tested-by: default avatarGrant Likely <grant.likely@linaro.org>
Tested-by: default avatarStephen Chivers <schivers@csc.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Git-commit: 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6
[joonwoop@codeaurora.org: updated drivers/base/dma-contiguous.c to use 'const'
 qualifier.  dropped arch/arm/mach-exynos/exynos.c.]
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent 3ac3804d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static int __init vexpress_dt_find_scu(unsigned long node,
{
	if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) {
		phys_addr_t phys_addr;
		__be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);
		const __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);

		if (WARN_ON(!reg))
			return -EINVAL;
+4 −4
Original line number Diff line number Diff line
@@ -42,13 +42,13 @@
#include <asm/pci-bridge.h>

#ifdef CONFIG_EARLY_PRINTK
static char *stdout;
static const char *stdout;

static int __init early_init_dt_scan_chosen_serial(unsigned long node,
				const char *uname, int depth, void *data)
{
	unsigned long l;
	char *p;
	int l;
	const char *p;

	pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname);

@@ -79,7 +79,7 @@ static int __init early_init_dt_scan_chosen_serial(unsigned long node,
				(strncmp(p, "xlnx,opb-uartlite", 17) == 0) ||
				(strncmp(p, "xlnx,axi-uartlite", 17) == 0) ||
				(strncmp(p, "xlnx,mdm", 8) == 0)) {
			unsigned int *addrp;
			const unsigned int *addrp;

			*(u32 *)data = UARTLITE;

+2 −2
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ int crash_mem_ranges;
int __init early_init_dt_scan_fw_dump(unsigned long node,
			const char *uname, int depth, void *data)
{
	__be32 *sections;
	const __be32 *sections;
	int i, num_sections;
	unsigned long size;
	int size;
	const int *token;

	if (depth != 1 || strcmp(uname, "rtas") != 0)
+8 −7
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ static struct ibm_pa_feature {
	{CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0},
};

static void __init scan_features(unsigned long node, unsigned char *ftrs,
static void __init scan_features(unsigned long node, const unsigned char *ftrs,
				 unsigned long tablelen,
				 struct ibm_pa_feature *fp,
				 unsigned long ft_size)
@@ -201,8 +201,8 @@ static void __init scan_features(unsigned long node, unsigned char *ftrs,

static void __init check_cpu_pa_features(unsigned long node)
{
	unsigned char *pa_ftrs;
	unsigned long tablelen;
	const unsigned char *pa_ftrs;
	int tablelen;

	pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen);
	if (pa_ftrs == NULL)
@@ -256,7 +256,7 @@ static struct feature_property {
static inline void identical_pvr_fixup(unsigned long node)
{
	unsigned int pvr;
	char *model = of_get_flat_dt_prop(node, "model", NULL);
	const char *model = of_get_flat_dt_prop(node, "model", NULL);

	/*
	 * Since 440GR(x)/440EP(x) processors have the same pvr,
@@ -298,7 +298,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
	const u32 *prop;
	const u32 *intserv;
	int i, nthreads;
	unsigned long len;
	int len;
	int found = -1;
	int found_thread = 0;

@@ -440,8 +440,9 @@ int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname,
 */
static int __init early_init_dt_scan_drconf_memory(unsigned long node)
{
	__be32 *dm, *ls, *usm;
	unsigned long l, n, flags;
	const __be32 *dm, *ls, *usm;
	int l;
	unsigned long n, flags;
	u64 base, size, memblock_size;
	unsigned int is_kexec_kdump = 0, rngs;

+1 −1
Original line number Diff line number Diff line
@@ -1135,7 +1135,7 @@ void __init rtas_initialize(void)
int __init early_init_dt_scan_rtas(unsigned long node,
		const char *uname, int depth, void *data)
{
	u32 *basep, *entryp, *sizep;
	const u32 *basep, *entryp, *sizep;

	if (depth != 1 || strcmp(uname, "rtas") != 0)
		return 0;
Loading