Re: [PATCH v2 1/9] printk: Rename struct console_cmdline to preferred_console

From: John Ogness

Date: Fri May 08 2026 - 10:22:37 EST


On 2026-04-23, Petr Mladek <pmladek@xxxxxxxx> wrote:
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 0323149548f6..ca523acbf58d 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2624,8 +2624,10 @@ __setup("console_msg_format=", console_msg_format_setup);
> */
> static int __init console_setup(char *str)
> {
> - static_assert(sizeof(console_cmdline[0].devname) >= sizeof(console_cmdline[0].name) + 4);
> - char buf[sizeof(console_cmdline[0].devname)];
> + static_assert(sizeof(preferred_consoles[0].devname) >=
> + sizeof(preferred_consoles[0].name) + 4);
> +
> + char buf[sizeof(preferred_consoles[0].devname)];

I agree with Steven's suggestion to move the static_assert() below the
local variable definitions.

Reviewed-by: John Ogness <john.ogness@xxxxxxxxxxxxx>