[haiku-commits] BRANCH mmu_man-github.sam460ex - build/jam src/system/boot/platform/u-boot

  • From: mmu_man-github.sam460ex <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 23 Sep 2012 03:49:29 +0200 (CEST)

added 2 changesets to branch 'refs/remotes/mmu_man-github/sam460ex'
old head: 3b8d5dc824d3db9e48fe91827296ebf1a397242f
new head: ca6bf83ff90b352c84742d268f8bd8f39d37cbb9

----------------------------------------------------------------------------

fba6afd: Merge branch 'master' into sam460ex

ca6bf83: Fix warnings

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 20 insertions(+), 16 deletions(-)
build/jam/OptionalPackages                      |   12 +++++-----
src/system/boot/platform/u-boot/fdt_support.cpp |   24 +++++++++++--------

############################################################################

Commit:      fba6afd7cd8855776663a32e81acc0fea6ebd16e

Author:      François Revol <revol@xxxxxxx>
Date:        Sun Sep 23 00:49:01 2012 UTC

Merge branch 'master' into sam460ex

----------------------------------------------------------------------------

############################################################################

Commit:      ca6bf83ff90b352c84742d268f8bd8f39d37cbb9

Author:      François Revol <revol@xxxxxxx>
Date:        Sun Sep 23 00:59:40 2012 UTC

Fix warnings

----------------------------------------------------------------------------

diff --git a/src/system/boot/platform/u-boot/fdt_support.cpp 
b/src/system/boot/platform/u-boot/fdt_support.cpp
index 96cec54..d0ac350 100644
--- a/src/system/boot/platform/u-boot/fdt_support.cpp
+++ b/src/system/boot/platform/u-boot/fdt_support.cpp
@@ -18,15 +18,19 @@ extern "C" {
 
 extern "C" void dump_fdt(const void *fdt);
 
-static const char *sTabTab = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
-#define DS "%.*s"
-#define DA depth - 1, sTabTab
-
 //#define FDT_DUMP_NODES
 //#define FDT_DUMP_PROPS
 //#define FDT_DUMP_PROP_VALUES
 
 
+#ifdef FDT_DUMP_NODES
+static const char *sTabTab = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+#define DS "%.*s"
+#define DA depth - 1, sTabTab
+#endif
+
+
+#ifdef FDT_DUMP_PROP_VALUES
 static void dump_hex(const char *data, int32 len, int depth)
 {
        char str[128];
@@ -49,15 +53,12 @@ static void dump_hex(const char *data, int32 len, int depth)
                dprintf(DS"    %-48.48s %s\n", DA, str, astr);
        }
 }
+#endif
 
 
 void dump_fdt(const void *fdt)
 {
-       uint32 *sizes;
-       int i, err, len;
-       int node = -1;
-       int depth = 0;
-       const struct fdt_property *property;
+       int err;
 
        dprintf("FDT @ %p:\n", fdt);
        
@@ -83,11 +84,14 @@ void dump_fdt(const void *fdt)
 #ifdef FDT_DUMP_NODES
        dprintf("fdt tree:\n");
 
+       int node = -1;
+       int depth = 0;
        while ((node = fdt_next_node(fdt, node, &depth)) >= 0) {
                dprintf(DS"node at %d: '%s'\n", DA, node,
                        fdt_get_name(fdt, node, NULL));
 #ifdef FDT_DUMP_PROPS
-               int prop;
+               int prop, len;
+               const struct fdt_property *property;
                prop = fdt_first_property_offset(fdt, node);
                while (prop >= 0) {
                        property = fdt_get_property_by_offset(fdt, prop, &len);


Other related posts:

  • » [haiku-commits] BRANCH mmu_man-github.sam460ex - build/jam src/system/boot/platform/u-boot - mmu_man-github . sam460ex