Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] tty: serial: fix earlycon dependency
@ 2020-08-17 16:50 Tong Zhang
  2020-08-17 17:00 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Tong Zhang @ 2020-08-17 16:50 UTC (permalink / raw)
  To: gregkh, jirislaby, linux-serial; +Cc: ztong0001, linux-kernel

parse_options() in drivers/tty/serial/earlycon.c calls
uart_parse_earlycon() in drivers/tty/serial/serial_core.c
therefore selecting SERIAL_EARLYCON should automatically
select SERIAL_CORE, otherwise will result in symbol not
found error during linking if SERIAL_CORE is not configured
as builtin

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 drivers/tty/serial/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 8a0352eb337c..42e844314cbb 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -8,6 +8,7 @@ menu "Serial drivers"
 
 config SERIAL_EARLYCON
 	bool
+	select SERIAL_CORE
 	help
 	  Support for early consoles with the earlycon parameter. This enables
 	  the console before standard serial driver is probed. The console is
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] tty: serial: fix earlycon dependency
  2020-08-17 16:50 [PATCH] tty: serial: fix earlycon dependency Tong Zhang
@ 2020-08-17 17:00 ` Greg KH
  2020-08-17 17:25   ` Tong Zhang
  2020-08-17 18:54   ` [PATCH v2] Fixes: tty: serial: " Tong Zhang
  0 siblings, 2 replies; 12+ messages in thread
From: Greg KH @ 2020-08-17 17:00 UTC (permalink / raw)
  To: Tong Zhang; +Cc: jirislaby, linux-serial, linux-kernel

On Mon, Aug 17, 2020 at 12:50:59PM -0400, Tong Zhang wrote:
> parse_options() in drivers/tty/serial/earlycon.c calls
> uart_parse_earlycon() in drivers/tty/serial/serial_core.c
> therefore selecting SERIAL_EARLYCON should automatically
> select SERIAL_CORE, otherwise will result in symbol not
> found error during linking if SERIAL_CORE is not configured
> as builtin

We can handle lines 72 characters long :)

> 
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>

What broke to cause this to be needed?

Can you provide a "Fixes:" tag for this?

> ---
>  drivers/tty/serial/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 8a0352eb337c..42e844314cbb 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -8,6 +8,7 @@ menu "Serial drivers"
>  
>  config SERIAL_EARLYCON
>  	bool
> +	select SERIAL_CORE

Are you _sure_ about this?  This feels odd...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] tty: serial: fix earlycon dependency
  2020-08-17 17:00 ` Greg KH
@ 2020-08-17 17:25   ` Tong Zhang
  2020-08-17 18:54   ` [PATCH v2] Fixes: tty: serial: " Tong Zhang
  1 sibling, 0 replies; 12+ messages in thread
From: Tong Zhang @ 2020-08-17 17:25 UTC (permalink / raw)
  To: Greg KH; +Cc: jirislaby, linux-serial, linux-kernel

On Mon, Aug 17, 2020 at 1:00 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> We can handle lines 72 characters long :)
OK, thanks, I was not aware of that, I will reformat the text in the
next version

> > Signed-off-by: Tong Zhang <ztong0001@gmail.com>
>
> What broke to cause this to be needed?

newbie here, please don't laugh at me,
I just followed what people were doing after read some articles from
the internet

> Can you provide a "Fixes:" tag for this?
sure, thanks for the suggestion

>
> > ---
> >  drivers/tty/serial/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > index 8a0352eb337c..42e844314cbb 100644
> > --- a/drivers/tty/serial/Kconfig
> > +++ b/drivers/tty/serial/Kconfig
> > @@ -8,6 +8,7 @@ menu "Serial drivers"
> >
> >  config SERIAL_EARLYCON
> >       bool
> > +     select SERIAL_CORE
>
> Are you _sure_ about this?  This feels odd...

Yeah.. that also seems odd to me -- this bug can be triggered under
some corner cases
which I haven't figured out why --
I can encounter this problem when doing allmodconfig followed by some random
select/deselect in menuconfig. -- It seems that menuconfig is not
doing some dependency
check correctly, i.e. when SERIAL_CORE is not builtin, SERIAL_EARLYCON
should not
be selected either.
What do you suggest?

> thanks,
Thank you.

> greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] Fixes: tty: serial: earlycon dependency
  2020-08-17 17:00 ` Greg KH
  2020-08-17 17:25   ` Tong Zhang
@ 2020-08-17 18:54   ` Tong Zhang
  2020-08-18  5:42     ` Jiri Slaby
  2020-08-18 11:19     ` Greg KH
  1 sibling, 2 replies; 12+ messages in thread
From: Tong Zhang @ 2020-08-17 18:54 UTC (permalink / raw)
  To: gregkh, jirislaby, linux-serial; +Cc: ztong0001, linux-kernel

parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
should automatically select SERIAL_CORE, otherwise will result in symbol
not found error during linking if SERIAL_CORE is not configured as builtin

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 drivers/tty/serial/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 8a0352eb337c..42e844314cbb 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -8,6 +8,7 @@ menu "Serial drivers"
 
 config SERIAL_EARLYCON
 	bool
+	select SERIAL_CORE
 	help
 	  Support for early consoles with the earlycon parameter. This enables
 	  the console before standard serial driver is probed. The console is
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] Fixes: tty: serial: earlycon dependency
  2020-08-17 18:54   ` [PATCH v2] Fixes: tty: serial: " Tong Zhang
@ 2020-08-18  5:42     ` Jiri Slaby
  2020-08-18 11:19     ` Greg KH
  1 sibling, 0 replies; 12+ messages in thread
From: Jiri Slaby @ 2020-08-18  5:42 UTC (permalink / raw)
  To: Tong Zhang, gregkh, linux-serial; +Cc: linux-kernel, Peter Hurley

On 17. 08. 20, 20:54, Tong Zhang wrote:
> parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
> in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
> should automatically select SERIAL_CORE, otherwise will result in symbol
> not found error during linking if SERIAL_CORE is not configured as builtin
> 
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>

The "Fixes:" keyword should not have been in the Subject but here.
According to your findings something like this:

Fixes: 73abaf87f01b (serial: earlycon: Refactor parse_options into
serial core)

I am not sure:
1) it should be "select" (and not "depends")
2) serial earlycon should depend on serial core. But it's likely OK.

>  drivers/tty/serial/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 8a0352eb337c..42e844314cbb 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -8,6 +8,7 @@ menu "Serial drivers"
>  
>  config SERIAL_EARLYCON
>  	bool
> +	select SERIAL_CORE
>  	help
>  	  Support for early consoles with the earlycon parameter. This enables
>  	  the console before standard serial driver is probed. The console is
> 

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] Fixes: tty: serial: earlycon dependency
  2020-08-17 18:54   ` [PATCH v2] Fixes: tty: serial: " Tong Zhang
  2020-08-18  5:42     ` Jiri Slaby
@ 2020-08-18 11:19     ` Greg KH
  2020-08-18 16:25       ` [PATCH v3] " Tong Zhang
  2020-08-18 16:27       ` [PATCH v2] Fixes: " Tong Zhang
  1 sibling, 2 replies; 12+ messages in thread
From: Greg KH @ 2020-08-18 11:19 UTC (permalink / raw)
  To: Tong Zhang; +Cc: jirislaby, linux-serial, linux-kernel

On Mon, Aug 17, 2020 at 02:54:19PM -0400, Tong Zhang wrote:
> parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
> in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
> should automatically select SERIAL_CORE, otherwise will result in symbol
> not found error during linking if SERIAL_CORE is not configured as builtin
> 
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>

As Jiri pointed out, the Fixes: line goes down here, not in your subject
line :)

Please fix up, thanks.

> ---
>  drivers/tty/serial/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

What changed from v1?  Also always list that below the --- line so we
know.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] tty: serial: earlycon dependency
  2020-08-18 11:19     ` Greg KH
@ 2020-08-18 16:25       ` Tong Zhang
  2020-08-18 18:54         ` [PATCH v4] " Tong Zhang
  2020-08-18 16:27       ` [PATCH v2] Fixes: " Tong Zhang
  1 sibling, 1 reply; 12+ messages in thread
From: Tong Zhang @ 2020-08-18 16:25 UTC (permalink / raw)
  To: gregkh, jirislaby, robh, linux-serial; +Cc: ztong0001, linux-kernel

parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
should automatically select SERIAL_CORE, otherwise will result in symbol
not found error during linking if SERIAL_CORE is not configured as builtin.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---

Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")
v2: I made an attempt to fix the commit log
v3: I made another attempt to fix the commit log and I also changed
select to depends according to Jiri's comment

 drivers/tty/serial/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 8a0352eb337c..6aed721e9287 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -8,6 +8,7 @@ menu "Serial drivers"
 
 config SERIAL_EARLYCON
 	bool
+	depends SERIAL_CORE
 	help
 	  Support for early consoles with the earlycon parameter. This enables
 	  the console before standard serial driver is probed. The console is
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] Fixes: tty: serial: earlycon dependency
  2020-08-18 11:19     ` Greg KH
  2020-08-18 16:25       ` [PATCH v3] " Tong Zhang
@ 2020-08-18 16:27       ` Tong Zhang
  1 sibling, 0 replies; 12+ messages in thread
From: Tong Zhang @ 2020-08-18 16:27 UTC (permalink / raw)
  To: Greg KH; +Cc: Jiri Slaby, linux-serial, linux-kernel

Thanks Greg and Jiri for your suggestion!
I made another attempt to fix those problems. Hope it will work this time.
Thank you!

On Tue, Aug 18, 2020 at 7:19 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Aug 17, 2020 at 02:54:19PM -0400, Tong Zhang wrote:
> > parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
> > in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
> > should automatically select SERIAL_CORE, otherwise will result in symbol
> > not found error during linking if SERIAL_CORE is not configured as builtin
> >
> > Signed-off-by: Tong Zhang <ztong0001@gmail.com>
>
> As Jiri pointed out, the Fixes: line goes down here, not in your subject
> line :)
>
> Please fix up, thanks.
>
> > ---
> >  drivers/tty/serial/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
>
> What changed from v1?  Also always list that below the --- line so we
> know.
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v4] tty: serial: earlycon dependency
  2020-08-18 16:25       ` [PATCH v3] " Tong Zhang
@ 2020-08-18 18:54         ` Tong Zhang
  2020-08-28  8:20           ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Tong Zhang @ 2020-08-18 18:54 UTC (permalink / raw)
  To: gregkh, jirislaby, robh, linux-serial, linux-kernel
  Cc: ztong0001, kernel test robot

parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
should automatically select SERIAL_CORE, otherwise will result in symbol
not found error during linking if SERIAL_CORE is not configured as builtin

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---

Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")
v2: I made an attempt to fix the commit log
v3: I made another attempt to fix the commit log and I also changed
select to depends according to Jiri's comment
v4: fixed another stupid error -- should be "depends on" not "depends"
Reported-by: kernel test robot <lkp@intel.com>

 drivers/tty/serial/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 8a0352eb337c..759ac4a5a5c5 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -8,6 +8,7 @@ menu "Serial drivers"
 
 config SERIAL_EARLYCON
 	bool
+	depends on SERIAL_CORE
 	help
 	  Support for early consoles with the earlycon parameter. This enables
 	  the console before standard serial driver is probed. The console is
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4] tty: serial: earlycon dependency
  2020-08-18 18:54         ` [PATCH v4] " Tong Zhang
@ 2020-08-28  8:20           ` Greg KH
  2020-08-28 12:39             ` [PATCH v5] " Tong Zhang
  2020-08-28 12:41             ` [PATCH v4] " Tong Zhang
  0 siblings, 2 replies; 12+ messages in thread
From: Greg KH @ 2020-08-28  8:20 UTC (permalink / raw)
  To: Tong Zhang; +Cc: jirislaby, robh, linux-serial, linux-kernel, kernel test robot

On Tue, Aug 18, 2020 at 02:54:59PM -0400, Tong Zhang wrote:
> parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
> in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
> should automatically select SERIAL_CORE, otherwise will result in symbol
> not found error during linking if SERIAL_CORE is not configured as builtin
> 
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>
> ---
> 
> Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")

This should be up above your signed-off-by line.

Can you fix that up and resend?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v5] tty: serial: earlycon dependency
  2020-08-28  8:20           ` Greg KH
@ 2020-08-28 12:39             ` Tong Zhang
  2020-08-28 12:41             ` [PATCH v4] " Tong Zhang
  1 sibling, 0 replies; 12+ messages in thread
From: Tong Zhang @ 2020-08-28 12:39 UTC (permalink / raw)
  To: gregkh, jirislaby, robh, linux-serial, linux-kernel
  Cc: ztong0001, kernel test robot

parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon
in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON
should automatically select SERIAL_CORE, otherwise will result in symbol
not found error during linking if SERIAL_CORE is not configured as builtin

Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---

v2: I made an attempt to fix the commit log
v3: I made another attempt to fix the commit log and I also changed
select to depends according to Jiri's comment
v4: fixed another stupid error -- should be "depends on" not "depends"
Reported-by: kernel test robot <lkp@intel.com>
v5: fix commit log - move Fixes line

 drivers/tty/serial/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 9409be982aa6..54586c1aba60 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -8,6 +8,7 @@ menu "Serial drivers"
 
 config SERIAL_EARLYCON
 	bool
+	depends on SERIAL_CORE
 	help
 	  Support for early consoles with the earlycon parameter. This enables
 	  the console before standard serial driver is probed. The console is
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4] tty: serial: earlycon dependency
  2020-08-28  8:20           ` Greg KH
  2020-08-28 12:39             ` [PATCH v5] " Tong Zhang
@ 2020-08-28 12:41             ` Tong Zhang
  1 sibling, 0 replies; 12+ messages in thread
From: Tong Zhang @ 2020-08-28 12:41 UTC (permalink / raw)
  To: Greg KH; +Cc: Jiri Slaby, robh, linux-serial, linux-kernel, kernel test robot

On Fri, Aug 28, 2020 at 4:20 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> > Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")
>
> This should be up above your signed-off-by line.
>
> Can you fix that up and resend?
>
> thanks,
>
> greg k-h

Thanks Greg! I did another revision.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 16:50 [PATCH] tty: serial: fix earlycon dependency Tong Zhang
2020-08-17 17:00 ` Greg KH
2020-08-17 17:25   ` Tong Zhang
2020-08-17 18:54   ` [PATCH v2] Fixes: tty: serial: " Tong Zhang
2020-08-18  5:42     ` Jiri Slaby
2020-08-18 11:19     ` Greg KH
2020-08-18 16:25       ` [PATCH v3] " Tong Zhang
2020-08-18 18:54         ` [PATCH v4] " Tong Zhang
2020-08-28  8:20           ` Greg KH
2020-08-28 12:39             ` [PATCH v5] " Tong Zhang
2020-08-28 12:41             ` [PATCH v4] " Tong Zhang
2020-08-18 16:27       ` [PATCH v2] Fixes: " Tong Zhang

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git