All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Markuss Broks <markuss.broks@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Ard Biesheuvel <ardb@kernel.org>,
	Jiri Slaby <jirislaby@kernel.org>, Helge Deller <deller@gmx.de>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Borislav Petkov <bp@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Michal Suchanek <msuchanek@suse.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Wei Ming Chen <jj251510319013@gmail.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Tony Lindgren <tony@atomide.com>,
	linux-doc@vger.kernel.org, linux-efi@vger.kernel.org,
	linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dri-devel@lists.freedesktop.org, Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node
Date: Thu, 28 Jul 2022 16:38:33 +0200	[thread overview]
Message-ID: <YuKfaVG/ZbYtFjS/@kroah.com> (raw)
In-Reply-To: <20220728142824.3836-2-markuss.broks@gmail.com>

On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:
> Pass a pointer to device-tree node in case the driver probed from
> OF. This makes early console drivers able to fetch options from
> device-tree node properties.
> 
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
> ---
>  drivers/tty/serial/earlycon.c | 3 +++
>  include/linux/serial_core.h   | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 57c70851f22a0e78805f34d1a7700708104b6f6a..14e8a7fe54486a1c377a6659c37a73858de5bf0b 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -304,6 +304,9 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
>  		strlcpy(early_console_dev.options, options,
>  			sizeof(early_console_dev.options));
>  	}
> +
> +	early_console_dev.node = node;
> +
>  	earlycon_init(&early_console_dev, match->name);
>  	err = match->setup(&early_console_dev, options);
>  	earlycon_print_info(&early_console_dev);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index cbd5070bc87f42aa450c4ca7af8a9b59fbe88574..3295721f33e482124fae8370b5889d5d6c012303 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -349,6 +349,7 @@ struct earlycon_device {
>  	struct uart_port port;
>  	char options[16];		/* e.g., 115200n8 */
>  	unsigned int baud;
> +	unsigned long node;

That should not be an unsigned long, but rather an 'int'.  Something got
messed up, of_setup_earlycon() should be changed to reflect this before
propagating the error to other places in the kernel.

And it's not really a "node" but an "offset", right?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Markuss Broks <markuss.broks@gmail.com>
Cc: linux-fbdev@vger.kernel.org, linux-efi@vger.kernel.org,
	linux-doc@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	dri-devel@lists.freedesktop.org,
	Wei Ming Chen <jj251510319013@gmail.com>,
	phone-devel@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Jonathan Corbet <corbet@lwn.net>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Javier Martinez Canillas <javierm@redhat.com>,
	linux-serial@vger.kernel.org, Borislav Petkov <bp@suse.de>,
	Petr Mladek <pmladek@suse.com>, Kees Cook <keescook@chromium.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	~postmarketos/upstreaming@lists.sr.ht,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Michal Suchanek <msuchanek@suse.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Helge Deller <deller@gmx.de>
Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node
Date: Thu, 28 Jul 2022 16:38:33 +0200	[thread overview]
Message-ID: <YuKfaVG/ZbYtFjS/@kroah.com> (raw)
In-Reply-To: <20220728142824.3836-2-markuss.broks@gmail.com>

On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:
> Pass a pointer to device-tree node in case the driver probed from
> OF. This makes early console drivers able to fetch options from
> device-tree node properties.
> 
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
> ---
>  drivers/tty/serial/earlycon.c | 3 +++
>  include/linux/serial_core.h   | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 57c70851f22a0e78805f34d1a7700708104b6f6a..14e8a7fe54486a1c377a6659c37a73858de5bf0b 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -304,6 +304,9 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
>  		strlcpy(early_console_dev.options, options,
>  			sizeof(early_console_dev.options));
>  	}
> +
> +	early_console_dev.node = node;
> +
>  	earlycon_init(&early_console_dev, match->name);
>  	err = match->setup(&early_console_dev, options);
>  	earlycon_print_info(&early_console_dev);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index cbd5070bc87f42aa450c4ca7af8a9b59fbe88574..3295721f33e482124fae8370b5889d5d6c012303 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -349,6 +349,7 @@ struct earlycon_device {
>  	struct uart_port port;
>  	char options[16];		/* e.g., 115200n8 */
>  	unsigned int baud;
> +	unsigned long node;

That should not be an unsigned long, but rather an 'int'.  Something got
messed up, of_setup_earlycon() should be changed to reflect this before
propagating the error to other places in the kernel.

And it's not really a "node" but an "offset", right?

thanks,

greg k-h

  reply	other threads:[~2022-07-28 14:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 14:28 [PATCH 0/2] Add generic framebuffer support to EFI earlycon driver Markuss Broks
2022-07-28 14:28 ` Markuss Broks
2022-07-28 14:28 ` [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node Markuss Broks
2022-07-28 14:28   ` Markuss Broks
2022-07-28 14:38   ` Greg Kroah-Hartman [this message]
2022-07-28 14:38     ` Greg Kroah-Hartman
2022-07-28 21:04     ` Andy Shevchenko
2022-07-28 21:04       ` Andy Shevchenko
2022-07-29  7:57       ` Greg Kroah-Hartman
2022-07-29  7:57         ` Greg Kroah-Hartman
2022-07-29 10:47         ` Andy Shevchenko
2022-07-29 10:47           ` Andy Shevchenko
2022-07-28 14:28 ` [PATCH 2/2] efi: earlycon: Add support for generic framebuffers and move to fbdev subsystem Markuss Broks
2022-07-28 14:28   ` Markuss Broks
2022-07-28 14:39   ` Greg Kroah-Hartman
2022-07-28 14:39     ` Greg Kroah-Hartman
2022-07-28 14:52     ` Markuss Broks
2022-07-28 14:52       ` Markuss Broks
2022-07-28 15:01       ` Greg Kroah-Hartman
2022-07-28 15:01         ` Greg Kroah-Hartman
2022-08-06 16:26         ` Markuss Broks
2022-08-06 16:26           ` Markuss Broks
2022-08-07  6:53           ` Greg Kroah-Hartman
2022-08-07  6:53             ` Greg Kroah-Hartman
2022-09-06 19:39             ` Daniel Vetter
2022-09-06 19:39               ` Daniel Vetter
2022-07-28 21:06       ` Andy Shevchenko
2022-07-28 21:06         ` Andy Shevchenko
2022-07-28 14:48   ` Arnd Bergmann
2022-07-28 14:48     ` Arnd Bergmann
2022-07-28 14:57     ` Markuss Broks
2022-07-28 14:57       ` Markuss Broks
2022-07-28 15:16       ` Arnd Bergmann
2022-07-28 15:16         ` Arnd Bergmann
2022-07-28 18:13         ` Thomas Zimmermann
2022-07-28 18:13           ` Thomas Zimmermann
2022-07-28 21:19   ` Andy Shevchenko
2022-07-28 21:19     ` Andy Shevchenko
2022-07-30 11:54     ` Markuss Broks
2022-07-30 11:54       ` Markuss Broks
2022-07-30 10:25       ` Andy Shevchenko
2022-07-30 10:25         ` Andy Shevchenko
2022-07-28 21:20   ` kernel test robot
2022-07-28 21:20     ` kernel test robot

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=YuKfaVG/ZbYtFjS/@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=bp@suse.de \
    --cc=corbet@lwn.net \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jirislaby@kernel.org \
    --cc=jj251510319013@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=markuss.broks@gmail.com \
    --cc=msuchanek@suse.de \
    --cc=paulmck@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=tony@atomide.com \
    --cc=tzimmermann@suse.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.