arm: Fix conversion to early_init_dt_scan() for non-DT platforms
PATCH 1/1 arm: Fix conversion to early_init_dt_scan() for non-DT platforms
From: Mark Brown <[email protected]>
Commit 67a964490bfd14 (arm: use early_init_dt_scan) in the OF tree in -next converts ARM to use early_init_dt_scan(), factoring out some common code. However it ignores the return value of the function meaning that on non-DT platforms the kernel fails to boot as it attempts to configure itself using DT.
Fix this by adding the appropriate return value check.
--- arch/arm/kernel/devtree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/kernel/devtree.c +2 -1
@@ -198,7 +198,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)if (!dt_phys)return NULL ; -early_init_dt_scan (phys_to_virt (dt_phys)); +if (!early_init_dt_scan (phys_to_virt (dt_phys))) +return NULL ;/* Search the mdescs for the 'best' compatible value match */ dt_root =of_get_flat_dt_root ();
Signature · 1 line
1.8.4.rc3
PATCH 1/1 arm: Fix conversion to early_init_dt_scan() for non-DT platforms
Quoted 9 lines · Mark Brown
From: Mark Brown <[email protected]>
Commit
67a964490bfd14(arm: useearly_init_dt_scan) in the OF tree in -next converts ARM to useearly_init_dt_scan(), factoring out some common code. However it ignores the return value of the function meaning that on non-DT platforms the kernel fails to boot as it attempts to configure itself using DT.Fix this by adding the appropriate return value check.
I have this fixed already in my tree. I had not pushed out my -next branch with the fix, but have done so now.
Rob
Quoted 21 lines
Signed-off-by Mark Brown <[email protected]>--- arch/arm/kernel/devtree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm/kernel/devtree.c +2
-1@@ -198,7 +198,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)if (!dt_phys)return NULL ; -early_init_dt_scan (phys_to_virt (dt_phys)); +if (!early_init_dt_scan (phys_to_virt (dt_phys))) +return NULL ;/* Search the mdescs for the 'best' compatible value match */ dt_root =of_get_flat_dt_root ();
PATCH 1/1 arm: Fix conversion to early_init_dt_scan() for non-DT platforms
Quoted 2 lines · Rob Herring
I have this fixed already in my tree. I had not pushed out my -next branch with the fix, but have done so now.
OK, thanks - so long as it gets fixed that's the important thing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131003/a1e67258/attachment.sig>
PATCH 1/1 arm: Fix conversion to early_init_dt_scan() for non-DT platforms
In reply to Mark BrownQuoted 11 lines · Mark Brown
From: Mark Brown <[email protected]>
Commit
67a964490bfd14(arm: useearly_init_dt_scan) in the OF tree in -next converts ARM to useearly_init_dt_scan(), factoring out some common code. However it ignores the return value of the function meaning that on non-DT platforms the kernel fails to boot as it attempts to configure itself using DT.Fix this by adding the appropriate return value check.
Signed-off-by Mark Brown <[email protected]>
Hm, I thought I had reported this to Rob and he had fixed it already. Is a stale version of the patches in the DT tree?
-Olof