public inbox for devicetree-compiler@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checks: Fix bus-range check
@ 2021-06-29 11:43 Thierry Reding
       [not found] ` <20210629114304.2451114-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2021-06-29 11:43 UTC (permalink / raw)
  To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The upper limit of the bus-range is specified by the second cell of the
bus-range property.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 checks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks.c b/checks.c
index e2690e90f90c..fb3fc9cda4b1 100644
--- a/checks.c
+++ b/checks.c
@@ -892,7 +892,7 @@ static void check_pci_device_bus_num(struct check *c, struct dt_info *dti, struc
 	} else {
 		cells = (cell_t *)prop->val.val;
 		min_bus = fdt32_to_cpu(cells[0]);
-		max_bus = fdt32_to_cpu(cells[0]);
+		max_bus = fdt32_to_cpu(cells[1]);
 	}
 	if ((bus_num < min_bus) || (bus_num > max_bus))
 		FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] checks: Fix bus-range check
       [not found] ` <20210629114304.2451114-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2021-06-30  0:32   ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2021-06-30  0:32 UTC (permalink / raw)
  To: Thierry Reding; +Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Tue, Jun 29, 2021 at 01:43:04PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> The upper limit of the bus-range is specified by the second cell of the
> bus-range property.
> 
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Applied, thanks.

> ---
>  checks.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/checks.c b/checks.c
> index e2690e90f90c..fb3fc9cda4b1 100644
> --- a/checks.c
> +++ b/checks.c
> @@ -892,7 +892,7 @@ static void check_pci_device_bus_num(struct check *c, struct dt_info *dti, struc
>  	} else {
>  		cells = (cell_t *)prop->val.val;
>  		min_bus = fdt32_to_cpu(cells[0]);
> -		max_bus = fdt32_to_cpu(cells[0]);
> +		max_bus = fdt32_to_cpu(cells[1]);
>  	}
>  	if ((bus_num < min_bus) || (bus_num > max_bus))
>  		FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-30  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-29 11:43 [PATCH] checks: Fix bus-range check Thierry Reding
     [not found] ` <20210629114304.2451114-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-06-30  0:32   ` David Gibson

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