linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
		linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: john.ogness@linutronix.de, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH v11 02/21] printk: Make vprintk_deferred() public
Date: Wed, 09 Jul 2025 18:02:23 +0200	[thread overview]
Message-ID: <eacbe956f6815bccd4110cf3f82ffe76c0c4e09b.camel@redhat.com> (raw)
In-Reply-To: <6e110a17d50d7d6954e17f3194f555d18fe521af.1751634289.git.namcao@linutronix.de>

On Fri, 2025-07-04 at 15:19 +0200, Nam Cao wrote:
> vprintk_deferred() is useful for implementing runtime verification
> reactors. Make it public.
> 
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> ---
>  include/linux/printk.h   | 5 +++++
>  kernel/printk/internal.h | 1 -
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index 5b462029d03c..08f1775c60fd 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;
>  }
> +__printf(1, 0) int vprintk_deferred(const char *fmt, va_list args)
> +{
> +	return 0;
> +}

Was just running tests after rebasing and I received a kernel bot
warning from an unlikely build without CONFIG_PRINTK [1].

>> include/linux/printk.h:218:20: warning: no previous prototype for
function 'vprintk_deferred' [-Wmissing-prototypes]
     218 | __printf(1, 0) int vprintk_deferred(const char *fmt, va_list
args)
         |                    ^
   include/linux/printk.h:218:16: note: declare 'static' if the
function is not intended to be used outside of this translation unit
     218 | __printf(1, 0) int vprintk_deferred(const char *fmt, va_list
args)
         |                ^
         |                static
   1 warning generated.


I believe this ought to be static:

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

Cheers,
Gabriele

[1] -
https://download.01.org/0day-ci/archive/20250709/202507092300.Isx1ydMp-lkp@intel.com/

>  static inline __printf(1, 2) __cold
>  int _printk(const char *s, ...)
>  {
> diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
> index 48a24e7b309d..bbed41ad29cf 100644
> --- a/kernel/printk/internal.h
> +++ b/kernel/printk/internal.h
> @@ -72,7 +72,6 @@ int vprintk_store(int facility, int level,
>  		  const char *fmt, va_list args);
>  
>  __printf(1, 0) int vprintk_default(const char *fmt, va_list args);
> -__printf(1, 0) int vprintk_deferred(const char *fmt, va_list args);
>  
>  void __printk_safe_enter(void);
>  void __printk_safe_exit(void);


  reply	other threads:[~2025-07-09 16:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04 13:19 [PATCH v11 00/21] RV: Linear temporal logic monitors for RT application Nam Cao
2025-07-04 13:19 ` [PATCH v11 01/21] rv: Add #undef TRACE_INCLUDE_FILE Nam Cao
2025-07-04 13:19 ` [PATCH v11 02/21] printk: Make vprintk_deferred() public Nam Cao
2025-07-09 16:02   ` Gabriele Monaco [this message]
2025-07-09 17:18     ` Nam Cao
2025-07-04 13:19 ` [PATCH v11 03/21] panic: Add vpanic() Nam Cao
2025-07-04 13:19 ` [PATCH v11 04/21] rv: Let the reactors take care of buffers Nam Cao
2025-07-04 13:19 ` [PATCH v11 05/21] verification/dot2k: Make a separate dot2k_templates/Kconfig_container Nam Cao
2025-07-04 13:19 ` [PATCH v11 06/21] verification/dot2k: Remove __buff_to_string() Nam Cao
2025-07-04 13:19 ` [PATCH v11 07/21] verification/dot2k: Replace is_container() hack with subparsers Nam Cao
2025-07-04 13:20 ` [PATCH v11 08/21] rv: rename CONFIG_DA_MON_EVENTS to CONFIG_RV_MON_EVENTS Nam Cao
2025-07-04 13:20 ` [PATCH v11 09/21] verification/dot2k: Prepare the frontend for LTL inclusion Nam Cao
2025-07-04 13:20 ` [PATCH v11 10/21] Documentation/rv: Prepare monitor synthesis document " Nam Cao
2025-07-04 13:20 ` [PATCH v11 11/21] verification/rvgen: Restructure the templates files Nam Cao
2025-07-04 13:20 ` [PATCH v11 12/21] verification/rvgen: Restructure the classes to prepare for LTL inclusion Nam Cao
2025-07-04 13:20 ` [PATCH v11 13/21] rv: Add support for LTL monitors Nam Cao
2025-07-04 13:20 ` [PATCH v11 14/21] verification/rvgen: Add support for linear temporal logic Nam Cao
2025-07-04 13:20 ` [PATCH v11 15/21] Documentation/rv: Add documentation for linear temporal logic monitors Nam Cao
2025-07-04 13:20 ` [PATCH v11 16/21] rv: Add rtapp container monitor Nam Cao
2025-07-04 13:20 ` [PATCH v11 17/21] riscv: mm: Add page fault trace points Nam Cao
2025-07-04 13:20 ` [PATCH v11 18/21] rv: Add rtapp_pagefault monitor Nam Cao
2025-07-04 13:20 ` [PATCH v11 19/21] rv: Add rtapp_sleep monitor Nam Cao
2025-07-04 13:20 ` [PATCH v11 20/21] rv: Add documentation for rtapp monitor Nam Cao
2025-07-04 13:20 ` [PATCH v11 21/21] rv: Allow to configure the number of per-task monitor Nam Cao
2025-08-10 21:12 ` [PATCH v11 00/21] RV: Linear temporal logic monitors for RT application patchwork-bot+linux-riscv

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=eacbe956f6815bccd4110cf3f82ffe76c0c4e09b.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).