archive mirror
 help / color / mirror / Atom feed
From: Brendan Higgins <>
Cc:,,,,, Brendan Higgins <>,
	Randy Dunlap <>,
	Stephen Rothwell <>
Subject: [PATCH v1] printk: add dummy vprintk_emit for when CONFIG_PRINTK=n
Date: Tue, 27 Aug 2019 16:48:35 -0700	[thread overview]
Message-ID: <> (raw)

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.

Reported-by: Randy Dunlap <>
Cc: Stephen Rothwell <>
Signed-off-by: Brendan Higgins <>
 include/linux/printk.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index cefd374c47b1..85b7970615a9 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -206,6 +206,13 @@ extern void printk_safe_init(void);
 extern void printk_safe_flush(void);
 extern void printk_safe_flush_on_panic(void);
+static inline __printf(5, 0)
+int vprintk_emit(int facility, int level,
+		 const char *dict, size_t dictlen,
+		 const char *fmt, va_list args)
+	return 0;
 static inline __printf(1, 0)
 int vprintk(const char *s, va_list args)

             reply	other threads:[~2019-08-27 23:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 23:48 Brendan Higgins [this message]
2019-08-28  0:45 ` [PATCH v1] printk: add dummy vprintk_emit for when CONFIG_PRINTK=n Randy Dunlap
2019-08-28  3:02 ` Sergey Senozhatsky
2019-08-28  4:45   ` Brendan Higgins
2019-08-28  5:24     ` Sergey Senozhatsky
2019-08-28  9:28       ` Brendan Higgins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).