Re: [PATCH v3 1/3] printk: Save console options for add_preferred_console_match()

From: Tony Lindgren
Date: Wed Nov 22 2023 - 01:18:39 EST


* Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> [231121 17:53]:
> On Tue, Nov 21, 2023 at 01:31:55PM +0200, Tony Lindgren wrote:
> > +#include <linux/console.h>
>
> > +#include <linux/kernel.h>
>
> I think instead of kernel.h you may want to see these:
>
> linux/init.h
> linux/string.h
>
> asm/errno.h
>
> > +#include "console_cmdline.h"

OK

> > +/**
> > + * console_opt_save - Saves kernel command line console option for driver use
> > + * @str: Kernel command line console name and option
> > + *
> > + * Saves a kernel command line console option for driver subsystems to use for
> > + * adding a preferred console during init. Called from console_setup() only.
>
> scripts/kernel-doc -v -none -Wall ...
>
> most likely will complain (no Return section).

OK adding.

> > + */
> > +int __init console_opt_save(char *str)
>
> str is not const? Hmm...

Nice yes it can be const char *str here. Hmm maybe with the third patch
also console_setup() can use const char * now.. Will check.

Thanks,

Tony