Re: [DTC][RFC] dtc: Allow better error reporting

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

 



On 11-02-21, 08:22, Rob Herring wrote:
> This needs to go in libfdt.
> 
> The executables can always print, it's the libfdt library that may or
> may not be able to.

Sure, Will add this delta to the patch..

$ gd 3950d7da35130a850ba9217ac7bfef781fa850b2..
diff --git a/dtc.h b/dtc.h
index b8ffec155263..d3e82fb8e3db 100644
--- a/dtc.h
+++ b/dtc.h
@@ -29,12 +29,6 @@
 #define debug(...)
 #endif
 
-#ifdef VERBOSE
-#define dtc_err(fmt, ...)      fprintf(stderr, "DTC: %s: %d: " fmt, __func__, __LINE__, ##__VA_ARGS__)
-#else
-#define dtc_err(fmt, ...)
-#endif
-
 #define DEFAULT_FDT_VERSION    17
 
 /*
diff --git a/fdtoverlay.c b/fdtoverlay.c
index 5f60ce4e4cea..5350af65679f 100644
--- a/fdtoverlay.c
+++ b/fdtoverlay.c
@@ -16,7 +16,6 @@
 
 #include <libfdt.h>
 
-#include "dtc.h"
 #include "util.h"
 
 #define BUF_INCREMENT  65536
diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
index b24286ac8c6c..17fc6075412f 100644
--- a/libfdt/fdt_overlay.c
+++ b/libfdt/fdt_overlay.c
@@ -10,7 +10,6 @@
 #include <libfdt.h>
 
 #include "libfdt_internal.h"
-#include "../dtc.h"
 
 /**
  * overlay_get_target_phandle - retrieves the target phandle of a fragment
diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
index 16bda1906a7b..fc7b3fa2eb2a 100644
--- a/libfdt/libfdt_internal.h
+++ b/libfdt/libfdt_internal.h
@@ -7,6 +7,12 @@
  */
 #include <fdt.h>
 
+#ifdef VERBOSE
+#define dtc_err(fmt, ...)      fprintf(stderr, "DTC: %s: %d: " fmt, __func__, __LINE__, ##__VA_ARGS__)
+#else
+#define dtc_err(fmt, ...)
+#endif
+
 #define FDT_ALIGN(x, a)                (((x) + (a) - 1) & ~((a) - 1))
 #define FDT_TAGALIGN(x)                (FDT_ALIGN((x), FDT_TAGSIZE))
 
-- 
viresh



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux