[PATCH] devicetree: Remove remaining references/tests for "chosen at 0"

Rob Herring robh at kernel.org
Wed Sep 6 00:41:45 AEST 2017


On Sat, Sep 2, 2017 at 3:43 AM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
> Since, according to a recent devicetree ML posting by Rob Herring,
> the node "/chosen at 0" is most likely for real Open Firmware and does
> not apply to DTSpec, remove all remaining tests and references for
> that node, of which there are very few left:
>
>  arch/microblaze/kernel/prom.c | 3 +--
>  arch/mips/generic/yamon-dt.c  | 4 ----
>  arch/powerpc/boot/oflib.c     | 7 ++-----
>  drivers/of/base.c             | 2 --
>  drivers/of/fdt.c              | 5 +----
>  5 files changed, 4 insertions(+), 17 deletions(-)
>
> This should be innocuous as, in all of the three arch/ files above,
> there is a test for "chosen" immediately before the test for
> "chosen at 0", so nothing should change.
>
> Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>
>
> ---
>
>   if this patch is premature, then just ignore it, thanks.
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 68f0999..c81bfd7 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -53,8 +53,7 @@ static int __init early_init_dt_scan_chosen_serial(unsigned long node,
>
>         pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname);
>
> -       if (depth == 1 && (strcmp(uname, "chosen") == 0 ||
> -                               strcmp(uname, "chosen at 0") == 0)) {
> +       if (depth == 1 && (strcmp(uname, "chosen") == 0)) {

I'd really hoped to remove early_init_dt_scan_chosen_serial()
altogether. It may now be just a matter of adding the compatible
strings to the uartlite earlycon.

Rob


More information about the Linuxppc-dev mailing list