linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [question] De-registration does not remove port
@ 2021-06-23  6:12 Saubhik Mukherjee
  2021-06-23  7:14 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Saubhik Mukherjee @ 2021-06-23  6:12 UTC (permalink / raw)
  To: vgupta, Greg KH, Jiri Slaby
  Cc: linux-snps-arc, linux-serial, linux-kernel, ldv-project, Pavel Andrianov

In drivers/tty/serial/arc_uart.c, arc_serial_remove always returns 0, 
instead of calling uart_remove_one_port to remove uart port from serial 
core. The comment says "This will be never be called". In my 
understanding, a port added using uart_add_one_port should be removed 
during de-registration.

Is there a reason for this behavior?

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

* Re: [question] De-registration does not remove port
  2021-06-23  6:12 [question] De-registration does not remove port Saubhik Mukherjee
@ 2021-06-23  7:14 ` Greg KH
  2021-06-24 13:03   ` Saubhik Mukherjee
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-06-23  7:14 UTC (permalink / raw)
  To: Saubhik Mukherjee
  Cc: vgupta, Jiri Slaby, linux-snps-arc, linux-serial, linux-kernel,
	ldv-project, Pavel Andrianov

On Wed, Jun 23, 2021 at 11:42:36AM +0530, Saubhik Mukherjee wrote:
> In drivers/tty/serial/arc_uart.c, arc_serial_remove always returns 0,
> instead of calling uart_remove_one_port to remove uart port from serial
> core. The comment says "This will be never be called". In my understanding,
> a port added using uart_add_one_port should be removed during
> de-registration.
> 
> Is there a reason for this behavior?

Did you test the code to see if that function will ever be called?

thanks,

greg k-h

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

* Re: [question] De-registration does not remove port
  2021-06-23  7:14 ` Greg KH
@ 2021-06-24 13:03   ` Saubhik Mukherjee
  2021-06-24 13:07     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Saubhik Mukherjee @ 2021-06-24 13:03 UTC (permalink / raw)
  To: Greg KH
  Cc: vgupta, Jiri Slaby, linux-snps-arc, linux-serial, linux-kernel,
	ldv-project, Pavel Andrianov

On 6/23/21 12:44 PM, Greg KH wrote:
> On Wed, Jun 23, 2021 at 11:42:36AM +0530, Saubhik Mukherjee wrote:
>> In drivers/tty/serial/arc_uart.c, arc_serial_remove always returns 0,
>> instead of calling uart_remove_one_port to remove uart port from serial
>> core. The comment says "This will be never be called". In my understanding,
>> a port added using uart_add_one_port should be removed during
>> de-registration.
>>
>> Is there a reason for this behavior?
> 
> Did you test the code to see if that function will ever be called?

I would like to reformulate the question: Suppose arc_serial_remove is 
never called. Then I would like to know how the driver de-registration 
is organized since the UART port is never removed?

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

* Re: [question] De-registration does not remove port
  2021-06-24 13:03   ` Saubhik Mukherjee
@ 2021-06-24 13:07     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-06-24 13:07 UTC (permalink / raw)
  To: Saubhik Mukherjee
  Cc: vgupta, Jiri Slaby, linux-snps-arc, linux-serial, linux-kernel,
	ldv-project, Pavel Andrianov

On Thu, Jun 24, 2021 at 06:33:01PM +0530, Saubhik Mukherjee wrote:
> On 6/23/21 12:44 PM, Greg KH wrote:
> > On Wed, Jun 23, 2021 at 11:42:36AM +0530, Saubhik Mukherjee wrote:
> > > In drivers/tty/serial/arc_uart.c, arc_serial_remove always returns 0,
> > > instead of calling uart_remove_one_port to remove uart port from serial
> > > core. The comment says "This will be never be called". In my understanding,
> > > a port added using uart_add_one_port should be removed during
> > > de-registration.
> > > 
> > > Is there a reason for this behavior?
> > 
> > Did you test the code to see if that function will ever be called?
> 
> I would like to reformulate the question: Suppose arc_serial_remove is never
> called. Then I would like to know how the driver de-registration is
> organized since the UART port is never removed?

I would like to reiterate my original question, have you tested this?

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

end of thread, other threads:[~2021-06-24 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  6:12 [question] De-registration does not remove port Saubhik Mukherjee
2021-06-23  7:14 ` Greg KH
2021-06-24 13:03   ` Saubhik Mukherjee
2021-06-24 13:07     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).