checks: Fix bus-range check
PATCH 1/1 checks: Fix bus-range check
From: Thierry Reding <[email protected]>
The upper limit of the bus-range is specified by the second cell of the bus-range property.
Signed-off-by Thierry Reding <[email protected]>
--- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
checks.c +1 -1
@@ -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)",
Signature · 1 line
2.32.0
A message that is not in the archive (sent off-list or not yet received): 20210629114304.2451114-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
David Gibson
AppliedQuoted 6 lines · Thierry Reding
From: Thierry Reding <[email protected]>
The upper limit of the bus-range is specified by the second cell of the bus-range property.
Signed-off-by Thierry Reding <[email protected]>
Applied, thanks.
Quoted 17 lines
--- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)checks.c +1
-1@@ -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)",
Signature · 4 lines
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