[PATCH v1 1/2] hexdump: Introduce debug APIs

Simon Glass sjg at chromium.org
Sat Nov 13 19:14:28 CET 2021


Hi Andy,

On Tue, 9 Nov 2021 at 05:03, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
>
> debug_hex_dump() and debug_hex_dump_bytes() conditionally print
> the dump based on DEBUG definition.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> ---
>  include/hexdump.h |  4 ++++
>  lib/hexdump.c     | 60 ++++++++++++++++++++++++++++++++++++++++-------
>  2 files changed, 56 insertions(+), 8 deletions(-)

+Heinrich Schuchardt

Is it possible to resolve this in the header file? It is a bit odd to
have to add DEBUG to hexdump.c in order to get debug output.

Note also the logging system so you can do

log(LOG_CATEGORY, dbg ? LOGL_DEBUG : LOGL_INFO, "fmt ...", ...)

Regards,
Simon


More information about the U-Boot mailing list