]> git.baikalelectronics.ru Git - uboot.git/commit
log: don't build the trace buffer when log is not ready
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 27 Nov 2020 10:20:52 +0000 (11:20 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 15 Jan 2021 19:36:11 +0000 (14:36 -0500)
commit96cc008dab12a13a311e355afcaed8060123c0cd
tree196bacce6a26c6addf3ff38271c40ff762132dc6
parent5d5a9c6cfb3792addcf4a4e3a582e5b4bdea2297
log: don't build the trace buffer when log is not ready

Update _log function to drop any traces when log is yet initialized:
vsnprintf is no more executed in this case.

This patch allows to reduce the cost for the dropped early debug trace.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
common/log.c