[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250709144914.6ee7199b@batman.local.home>
Date: Wed, 9 Jul 2025 14:49:14 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Nam Cao <namcao@...utronix.de>
Cc: John Ogness <john.ogness@...utronix.de>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Gabriele Monaco <gmonaco@...hat.com>, linux-trace-kernel@...r.kernel.org,
linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.com>, Sergey
Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH v12 02/12] printk: Make vprintk_deferred() public
On Wed, 9 Jul 2025 19:56:19 +0200
Nam Cao <namcao@...utronix.de> wrote:
> 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;
}
-- Steve
Powered by blists - more mailing lists