Thread (21 messages) 21 messages, 3 authors, 2025-08-10

Re: [PATCH v12 02/12] printk: Make vprintk_deferred() public

From: Nam Cao <hidden>
Date: 2025-07-09 18:53:38
Also in: lkml

On Wed, Jul 09, 2025 at 02:49:14PM -0400, Steven Rostedt wrote:
On Wed,  9 Jul 2025 19:56:19 +0200
Nam Cao [off-list ref] wrote:
quoted
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 5b462029d03c..d886ec98fbbd 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -154,6 +154,7 @@ int vprintk_emit(int facility, int level,
 
 asmlinkage __printf(1, 0)
 int vprintk(const char *fmt, va_list args);
+__printf(1, 0) int vprintk_deferred(const char *fmt, va_list args);
 
 asmlinkage __printf(1, 2) __cold
 int _printk(const char *fmt, ...);
@@ -214,6 +215,10 @@ int vprintk(const char *s, va_list args)
 {
 	return 0;
 }
+static inline __printf(1, 0) int vprintk_deferred(const char *fmt, va_list args)
+{
+	return 0;
+}
 static inline __printf(1, 2) __cold
 int _printk(const char *s, ...)
 {
All use cases I've seen throughout the kernel has the __printf() macro
on the line before the function. You're introducing a new formatting.
I'm thinking we should stay consistent:

__printf(1, 0)
int vprintk_deferred(const char *fmt, va_list args);

static inline __printf(1, 0)
int vprintk_deferred(const char *fmt, va_list args)
{
	return 0;
}
Yes we should.

It is possible that you make this amendment when/if you apply the patch, or
do you prefer me sending a new version?

Nam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help