Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of/fdt: Mark initial_boot_params as __ro_after_init

The FDT pointer, i.e. initial_boot_params, shouldn't be changed after
init. It's only set by boot code and then the only user of the FDT is
the raw sysfs reading API. Mark this pointer with __ro_after_init so
that the pointer can't be changed after init.

Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Stephen Boyd and committed by
Rob Herring
7c71650f 9b4d2b63

+1 -1
+1 -1
drivers/of/fdt.c
··· 516 516 int __initdata dt_root_addr_cells; 517 517 int __initdata dt_root_size_cells; 518 518 519 - void *initial_boot_params; 519 + void *initial_boot_params __ro_after_init; 520 520 521 521 #ifdef CONFIG_OF_EARLY_FLATTREE 522 522