* [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory
@ 2011-04-19 15:01 Shawn Guo
[not found] ` <1303225269-10092-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2011-04-19 15:01 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
patches-QSEj5FYQhm4dnm+yROfE0A
It fixes the return value of funciont early_init_dt_scan_memory on
the success return path.
Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/of/fdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c9db49c..387336d 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -659,7 +659,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
early_init_dt_add_memory_arch(base, size);
}
- return 0;
+ return 1;
}
int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1303225269-10092-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory [not found] ` <1303225269-10092-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2011-04-20 0:47 ` Jeremy Kerr 2011-04-20 2:44 ` Grant Likely 2011-04-20 14:16 ` Shawn Guo 0 siblings, 2 replies; 4+ messages in thread From: Jeremy Kerr @ 2011-04-20 0:47 UTC (permalink / raw) To: Shawn Guo Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linaro-kernel-cunTk1MwBs8s++Sfvej+rw, patches-QSEj5FYQhm4dnm+yROfE0A Hi Shawn, > It fixes the return value of funciont early_init_dt_scan_memory on > the success return path. [In general, the changelog should explain why you're making this change, not just re-iterate what the patch does. Does this fix a problem you were seeing?] With regards to this specific patch - I don't think this is correct; if we return 1 here, we'll abort the of_scan_flat_dt loop after successfully parsing one memory node, whereas machines may have multiple nodes. This change will break booting on those machines. Cheers, Jeremy ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory 2011-04-20 0:47 ` Jeremy Kerr @ 2011-04-20 2:44 ` Grant Likely 2011-04-20 14:16 ` Shawn Guo 1 sibling, 0 replies; 4+ messages in thread From: Grant Likely @ 2011-04-20 2:44 UTC (permalink / raw) To: Jeremy Kerr Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linaro-kernel-cunTk1MwBs8s++Sfvej+rw, patches-QSEj5FYQhm4dnm+yROfE0A On Tue, Apr 19, 2011 at 6:47 PM, Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote: > Hi Shawn, > >> It fixes the return value of funciont early_init_dt_scan_memory on >> the success return path. > > [In general, the changelog should explain why you're making this change, > not just re-iterate what the patch does. Does this fix a problem you > were seeing?] > > With regards to this specific patch - I don't think this is correct; if > we return 1 here, we'll abort the of_scan_flat_dt loop after > successfully parsing one memory node, whereas machines may have multiple > nodes. This change will break booting on those machines. > > Cheers, Yes, the current code is correct. All of the memory nodes are supposed to be processed. g. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory 2011-04-20 0:47 ` Jeremy Kerr 2011-04-20 2:44 ` Grant Likely @ 2011-04-20 14:16 ` Shawn Guo 1 sibling, 0 replies; 4+ messages in thread From: Shawn Guo @ 2011-04-20 14:16 UTC (permalink / raw) To: Jeremy Kerr Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linaro-kernel-cunTk1MwBs8s++Sfvej+rw, patches-QSEj5FYQhm4dnm+yROfE0A Hi Jeremy, On Wed, Apr 20, 2011 at 08:47:26AM +0800, Jeremy Kerr wrote: > Hi Shawn, > > > It fixes the return value of funciont early_init_dt_scan_memory on > > the success return path. > > [In general, the changelog should explain why you're making this change, > not just re-iterate what the patch does. Does this fix a problem you > were seeing?] > Thanks for the guide. > With regards to this specific patch - I don't think this is correct; if > we return 1 here, we'll abort the of_scan_flat_dt loop after > successfully parsing one memory node, whereas machines may have multiple > nodes. This change will break booting on those machines. > I really did not think of the case that there are multiple memory nodes. Please ignore it, and sorry for the noise. -- Regards, Shawn ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-20 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 15:01 [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory Shawn Guo
[not found] ` <1303225269-10092-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-04-20 0:47 ` Jeremy Kerr
2011-04-20 2:44 ` Grant Likely
2011-04-20 14:16 ` Shawn Guo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).