Linux real-time development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andrew Murray" <amurray@thegoodpenguin.co.uk>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2 2/4] printk: deprecate boot_delay in favour of printk_delay
Date: Tue, 30 Jun 2026 16:49:12 +0000	[thread overview]
Message-ID: <20260630164912.973F31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630-deprecate_boot_delay-v2-2-f9883d36aa4b@thegoodpenguin.co.uk>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Sysctl handler `proc_dointvec_minmax` is incorrectly used for an `unsigned int` variable.
- [Low] Passing an incompatible pointer type (`unsigned int *`) to `get_option()`, which expects an `int *`.
--

commit 75c913a5c205c791c2728e8990c05d9b6634f1b5
Author: Andrew Murray <amurray@thegoodpenguin.co.uk>

printk: deprecate boot_delay in favour of printk_delay

This commit deprecates the boot_delay kernel parameter in favor of
printk_delay. It extends printk_delay to be configurable via an early
kernel parameter, allowing it to function during both boot and runtime.
The delay is now skipped when messages are suppressed across all system
states.

> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 77f53eaed1321..cc203327247aa 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c

[ ... ]

> @@ -1339,11 +1327,34 @@ static void boot_delay_msec(int level)
>  	}
>  }
>  #else
> -static inline void boot_delay_msec(int level)
> +static inline void __init printk_delay_calculate(void)
>  {
>  }
>  
> +static inline void early_boot_delay_msec(void)
>  {
>  }
>  #endif
>  
> +static int __init printk_delay_setup(char *str)
> +{
> +	get_option(&str, &printk_delay_msec);

[Severity: Low]
Does this pointer sign mismatch introduce a build regression?

The get_option() function expects an int * for its second argument, but
printk_delay_msec was changed to an unsigned int in this patch. This triggers
a -Wincompatible-pointer-types warning, which is often treated as an error by
modern compilers.

[ ... ]

> @@ -2117,20 +2128,30 @@ static u8 *__printk_recursion_counter(void)
>  		local_irq_restore(flags);		\
>  	} while (0)
>  
> -int printk_delay_msec __read_mostly;
> +unsigned int printk_delay_msec __read_mostly;

[Severity: Low]
Is the sysctl handler for printk_delay_msec still correct?

In kernel/printk/sysctl.c, the sysctl entry for printk_delay_msec uses
the proc_dointvec_minmax handler, which expects a pointer to a signed int.
Since printk_delay_msec is now an unsigned int, should this be updated to
proc_douintvec_minmax to prevent an API regression?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260630-deprecate_boot_delay-v2-0-f9883d36aa4b@thegoodpenguin.co.uk?part=2

  reply	other threads:[~2026-06-30 16:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 16:35 [PATCH v2 0/4] printk: nbcon: deprecate boot_delay in favour of printk_delay Andrew Murray
2026-06-30 16:35 ` [PATCH v2 1/4] printk: remove BOOT_PRINTK_DELAY config option Andrew Murray
2026-06-30 17:08   ` sashiko-bot
2026-06-30 16:35 ` [PATCH v2 2/4] printk: deprecate boot_delay in favour of printk_delay Andrew Murray
2026-06-30 16:49   ` sashiko-bot [this message]
2026-06-30 16:35 ` [PATCH v2 3/4] printk: nbcon: move printk_delay to console emiting code Andrew Murray
2026-06-30 17:09   ` sashiko-bot
2026-06-30 16:36 ` [PATCH v2 4/4] Documentation/kernel-parameters: add/update printk_delay/boot_delay Andrew Murray

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=20260630164912.973F31F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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