[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.10] xen/arm: bootfdt: Use proper default for #address-cells and #size-cells



commit cdb1fb4921e2a8636c143e92f74cf0c8d5fce9b1
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Nov 29 17:57:32 2017 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Thu Jan 11 12:17:27 2018 -0800

    xen/arm: bootfdt: Use proper default for #address-cells and #size-cells
    
    Per the device-tree specific [1], when the property #address-cells
    and  #size-cells are not present, the default value should be resp. 1
    and 2.
    
    [1] 
https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    (cherry picked from commit c05aa4afac64ea687c1a2bf9277ba6552809495b)
---
 xen/arch/arm/bootfdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index 4a687e7..8eba42c 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -109,8 +109,8 @@ int __init device_tree_for_each_node(const void *fdt,
             continue;
         }
 
-        as = depth > 0 ? address_cells[depth-1] : 0;
-        ss = depth > 0 ? size_cells[depth-1] : 0;
+        as = depth > 0 ? address_cells[depth-1] : 
DT_ROOT_NODE_ADDR_CELLS_DEFAULT;
+        ss = depth > 0 ? size_cells[depth-1] : DT_ROOT_NODE_SIZE_CELLS_DEFAULT;
 
         address_cells[depth] = device_tree_get_u32(fdt, node,
                                                    "#address-cells", as);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.