All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Markuss Broks <markuss.broks@gmail.com>,
	Linux Kernel Mailing List <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 Documentation List <linux-doc@vger.kernel.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	"open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node
Date: Fri, 29 Jul 2022 12:47:35 +0200	[thread overview]
Message-ID: <CAHp75VcqtO5E91e5HxM6qN3gcMH5-_h=508chyDiWzvmLiFn6A@mail.gmail.com> (raw)
In-Reply-To: <YuOS5yUfNlTOtI6U@kroah.com>

On Fri, Jul 29, 2022 at 9:57 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote:
> > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:

...

> > > > +     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.
> >
> > It's a pointer, but what puzzles me, why it can't be declared as a such:
> >
> >  struct device_node *node;
> >
> > ?
>
> It should not be a pointer, trace things backwards, it comes from a call
> to of_setup_earlycon() from early_init_dt_scan_chosen_stdout() which has
> offset declared as an int, and then does:
>         if (of_setup_earlycon(match, offset, options) == 0)
>
> So why would it be a node?

This is a very good question.

> > > And it's not really a "node" but an "offset", right?
> >
> > Seems no.
>
> Really?  What am I missing here?

It's me who is missing something here, thanks for your elaboration!
After it it becomes clear that your first question should be
addressed.

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	Markuss Broks <markuss.broks@gmail.com>,
	Linux Documentation List <linux-doc@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	dri-devel <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>,
	"open list:SERIAL DRIVERS" <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 Mailing List <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: Fri, 29 Jul 2022 12:47:35 +0200	[thread overview]
Message-ID: <CAHp75VcqtO5E91e5HxM6qN3gcMH5-_h=508chyDiWzvmLiFn6A@mail.gmail.com> (raw)
In-Reply-To: <YuOS5yUfNlTOtI6U@kroah.com>

On Fri, Jul 29, 2022 at 9:57 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote:
> > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote:

...

> > > > +     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.
> >
> > It's a pointer, but what puzzles me, why it can't be declared as a such:
> >
> >  struct device_node *node;
> >
> > ?
>
> It should not be a pointer, trace things backwards, it comes from a call
> to of_setup_earlycon() from early_init_dt_scan_chosen_stdout() which has
> offset declared as an int, and then does:
>         if (of_setup_earlycon(match, offset, options) == 0)
>
> So why would it be a node?

This is a very good question.

> > > And it's not really a "node" but an "offset", right?
> >
> > Seems no.
>
> Really?  What am I missing here?

It's me who is missing something here, thanks for your elaboration!
After it it becomes clear that your first question should be
addressed.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2022-07-29 10:48 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
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 [this message]
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='CAHp75VcqtO5E91e5HxM6qN3gcMH5-_h=508chyDiWzvmLiFn6A@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --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=gregkh@linuxfoundation.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.