[PATCH v2 6/6] log: Convert log values to printf() if not enabled

Tom Rini trini at konsulko.com
Sun Mar 14 20:33:27 CET 2021


On Wed, Jan 20, 2021 at 08:10:57PM -0700, Simon Glass wrote:

> At present if logging not enabled, log_info() becomes a nop. But we want
> log output at the 'info' level to be akin to printf(). Update the macro to
> pass the output straight to printf() in this case.
> 
> This mimics the behaviour for the log_...() macros like log_debug() and
> log_info(), so we can drop the special case for these.
> 
> Add new tests to cover this case.
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> Changes in v2:
> - Update commit message and cover letter to mention log_...() macros
> - Add a test for !CONFIG_LOG
> - Update log() to (effectively) call debug() for log_level == LOGL_DEBUG

As is, this last patch in the series causes tests to fail on sandbox.
I'm re-testing 1-5 by themselves right now.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210314/66a7ccc0/attachment.sig>


More information about the U-Boot mailing list