All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alex Nemirovsky <Alex.Nemirovsky@cortina-access.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	Jason Li <jason.li@cortina-access.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 1/3] tty: serial: Add UART driver for Cortina-Access platform
Date: Wed, 24 Mar 2021 07:02:59 +0100	[thread overview]
Message-ID: <YFrWE93aJ/XGparI@kroah.com> (raw)
In-Reply-To: <E0630C1D-AC64-4DB5-9467-EA2F4590EB26@cortina-access.com>

On Tue, Mar 23, 2021 at 07:25:58PM +0000, Alex Nemirovsky wrote:
> Hi Greg,
> 
> > On Mar 23, 2021, at 2:24 AM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > 
> > On Thu, Feb 18, 2021 at 06:42:09PM -0800, Alex Nemirovsky wrote:
> >> +static struct cortina_uart_port *cortina_uart_ports;
> > 
> > Why is this not a per-device pointer?
> > 
> >> +static void __exit cortina_uart_exit(void)
> >> +{
> >> +	platform_driver_unregister(&serial_cortina_driver);
> >> +	uart_unregister_driver(&cortina_uart_driver);
> >> +	kfree(cortina_uart_ports);
> > 
> > Should not need to free this here, it should be tied to the device, not
> > the driver.
> 
> Would it be possible to provide a reference to an example 
> of a good way to do it.

You have a device-specific data structure, put this information there.

> >> +}
> >> +
> >> +module_init(cortina_uart_init);
> >> +module_exit(cortina_uart_exit);
> >> +
> >> +MODULE_AUTHOR("Cortina-Access Inc.");
> >> +MODULE_DESCRIPTION(" Cortina-Access UART driver");
> >> +MODULE_LICENSE("GPL");
> >> diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
> >> index 62c2204..1931892 100644
> >> --- a/include/uapi/linux/serial_core.h
> >> +++ b/include/uapi/linux/serial_core.h
> >> @@ -277,4 +277,7 @@
> >> /* Freescale LINFlexD UART */
> >> #define PORT_LINFLEXUART	122
> >> 
> >> +/* Cortina-Access UART */
> >> +#define PORT_CORTINA_ACCESS	123
> > 
> > Also, no need for this, right?  I would prefer to not add new ids if at
> > all possible.
> 
> Could you explain why these are no longer required and what has 
> been done in the tty design to make this obsolete?

What do you use in userspace that requires this information to be sent
from the kernel?

thanks,

greg k-h

  reply	other threads:[~2021-03-24  6:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1613702532-5096-1-git-send-email-alex.nemirovsky@cortina-access.com>
2021-03-23  9:22 ` [PATCH 1/3] tty: serial: Add UART driver for Cortina-Access platform Greg Kroah-Hartman
2021-03-23 19:28   ` Alex Nemirovsky
2021-03-24  6:04     ` Greg Kroah-Hartman
2021-03-23  9:24 ` Greg Kroah-Hartman
2021-03-23 19:25   ` Alex Nemirovsky
2021-03-24  6:02     ` Greg Kroah-Hartman [this message]
     [not found] <1612425530-20483-1-git-send-email-alex.nemirovsky@cortina-access.com>
2021-02-04 15:48 ` Greg Kroah-Hartman
2021-02-04 15:49 ` Greg Kroah-Hartman
2021-02-04 22:22   ` Alex Nemirovsky

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=YFrWE93aJ/XGparI@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Alex.Nemirovsky@cortina-access.com \
    --cc=jason.li@cortina-access.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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.