[Skiboot] [PATCH v11 02/23] core/fdt: Improve debugging functionality
Gavin Shan
gwshan at linux.vnet.ibm.com
Wed Jun 1 13:12:52 AEST 2016
On Wed, Jun 01, 2016 at 11:47:22AM +1000, Andrew Donnellan wrote:
>On 20/05/16 16:32, Gavin Shan wrote:
>>This improves the debugging functionality in fdt.c. No functional
>>changes introduced:
>>
>> * Replace printf() with prlog().
>> * Introduce FDT_DBG() which is enabled on DEBUG_FDT.
>> * Move #ifdef before dump_fdt() for better extendability.
>>
>>Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>>---
>> core/fdt.c | 39 ++++++++++++++++++++-------------------
>> 1 file changed, 20 insertions(+), 19 deletions(-)
>>
>>diff --git a/core/fdt.c b/core/fdt.c
>>index a301f1f..721c35d 100644
>>--- a/core/fdt.c
>>+++ b/core/fdt.c
>>@@ -30,12 +30,15 @@ static int fdt_error;
>> static void *fdt;
>>
>> #undef DEBUG_FDT
>>+#ifdef DEBUG_FDT
>>+#define FDT_DBG(fmt, a...) prlog(PR_INFO, fmt, ##a)
>>+#else
>>+#define FDT_DBG(fmt, a...)
>>+#endif
>
>Why isn't this defined similarly to the other _DBG macros, i.e.
>
>#define FDT_DBG(fmt, a...)
> prlog(PR_DEBUG, "FDT: " fmt, ##a)
>
>?
>
Sounds reasonable to have PR_DEBUG and the fixed prefix. I will fix it in
next revision, Thanks, Andrew.
>I suppose you still want the DEBUG_FDT flag for dump_fdt() but I don't think
>it's needed for FDT_DBG?
>
After the patch, no DEBUG_FDT isn't needed to call dump_fdt() and FDT_DBG().
There are stub for dmp_fdt() and FDT_DBG() when DEBUG_FDT isn't declared
>This is minor, and it otherwise looks good, so:
>
>Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
>
>
>Andrew
>
>--
>Andrew Donnellan OzLabs, ADL Canberra
>andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list