From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 14 Mar 2021 13:32:02 -0700 Subject: [PATCH v2 6/6] log: Convert log values to printf() if not enabled In-Reply-To: <20210314193327.GA10131@bill-the-cat> References: <20210121031057.559301-1-sjg@chromium.org> <20210121031057.559301-7-sjg@chromium.org> <20210314193327.GA10131@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On Sun, 14 Mar 2021 at 12:33, Tom Rini wrote: > > 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 > > --- > > > > 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. OK thanks, great to see this. I'll revisit once things land. Regrads, Simon