mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH RESEND master] PBL: fdt: fix /memory parsing when #address-cells != #size-cells
Date: Tue, 31 May 2022 10:06:58 +0200	[thread overview]
Message-ID: <20220531080658.GR1615@pengutronix.de> (raw)
In-Reply-To: <20220530074102.632341-1-a.fatoum@pengutronix.de>

On Mon, May 30, 2022 at 09:41:02AM +0200, Ahmad Fatoum wrote:
> Due to a typo, this code assumed so far ignored #size-cells and assumed
> it to be equal to #address-cells. This breaks using the
> barebox-dt-2nd.img with some 64-bit device trees like the Raspberry Pi's.
> 
> Fixes: ffb0344b7410 ("ARM: Add generic device tree 2nd stage support")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Sent originally as part of the Raspberry Pi 4 support patch series.
> Split it out, so it can go into master independently.
> ---
>  pbl/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/pbl/fdt.c b/pbl/fdt.c
> index 51719698f269..8e4d1295074a 100644
> --- a/pbl/fdt.c
> +++ b/pbl/fdt.c
> @@ -47,7 +47,7 @@ void fdt_find_mem(const void *fdt, unsigned long *membase, unsigned long *memsiz
>  		pr_err("Cannot find #size-cells property");
>  		goto err;
>  	}
> -	ns = fdt32_to_cpu(*nap);
> +	ns = fdt32_to_cpu(*nsp);
>  
>  	/* Find the memory range */
>  	node = fdt_node_offset_by_prop_value(fdt, -1, "device_type",
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2022-05-31  8:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  7:41 Ahmad Fatoum
2022-05-31  8:06 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220531080658.GR1615@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH RESEND master] PBL: fdt: fix /memory parsing when #address-cells '\!'= #size-cells' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox