[Skiboot] [PATCH v11 02/23] core/fdt: Improve debugging functionality
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Wed Jun 1 11:47:22 AEST 2016
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)
?
I suppose you still want the DEBUG_FDT flag for dump_fdt() but I don't
think it's needed for FDT_DBG?
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