[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250709185334.uFpAU2mC@linutronix.de>
Date: Wed, 9 Jul 2025 20:53:34 +0200
From: Nam Cao <namcao@...utronix.de>
To: Steven Rostedt <rostedt@...dmis.org>
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, Jul 09, 2025 at 02:49:14PM -0400, Steven Rostedt wrote:
> 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;
> }
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
Powered by blists - more mailing lists