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

Commit e384789b authored by Jon Medhurst's avatar Jon Medhurst Committed by Amit Pundir
Browse files

of/fdt: fix build warnings in early_init_dt_scan_chosen()



For some reason commit "of: fix CONFIG_CMDLINE_EXTEND" changed some
variable types, restore these to the old types to avoid the following
warnings:

drivers/of/fdt.c: In function 'early_init_dt_scan_chosen':
drivers/of/fdt.c:932:45: warning: passing argument 3 of 'of_get_flat_dt_prop' from incompatible pointer type
   p = of_get_flat_dt_prop(node, "bootargs", &l);
                                             ^
drivers/of/fdt.c:619:20: note: expected 'int *' but argument is of type 'long unsigned int *'
 const void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
                    ^
drivers/of/fdt.c:932:5: warning: assignment discards 'const' qualifier from pointer target type
   p = of_get_flat_dt_prop(node, "bootargs", &l);
     ^

Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
parent 2e186453
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -911,8 +911,8 @@ static const char *config_cmdline = "";
int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
				     int depth, void *data)
{
	unsigned long l = 0;
	char *p = NULL;
	int l = 0;
	const char *p = NULL;
	char *cmdline = data;

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