Re: [PATCH v1] printk: add dummy vprintk_emit for when CONFIG_PRINTK=n
From: Sergey Senozhatsky
Date: Tue Aug 27 2019 - 23:02:43 EST
On (08/27/19 16:48), Brendan Higgins wrote:
> Previously vprintk_emit was only defined when CONFIG_PRINTK=y, this
> caused a build failure in kunit/test.c when CONFIG_PRINTK was not set.
> Add a no-op dummy so that callers don't have to ifdef around this.
>
> Note: It has been suggested that this go in through the kselftest tree
> along with the KUnit patches, because KUnit depends on this. See the
> second link for the discussion on this.
Is there any reason for kunit to use vprintk_emit()? Can you switch
to pr_err()/pr_info()/pr_foo()?
vprintk_emit() function is pretty internal. It's not static because
drivers/base/core.c wants to add some extra payload to printk()
messages (extended headers, etc).
-ss