Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp842056pxf; Wed, 24 Mar 2021 18:11:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbPBqxGwHTFW3tLCK78TZdd2GmabQjrDrFOUJSz7i67pQhyCamY6xG0PkfQ7+mvbeo2jg9 X-Received: by 2002:a17:906:f8d5:: with SMTP id lh21mr6644496ejb.64.1616634676393; Wed, 24 Mar 2021 18:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616634676; cv=none; d=google.com; s=arc-20160816; b=Ty33HCwUXpi71vEnVqWZahtgP3/NxldTDDDWgfaepVVkjRtSikpVz+ORAjlS7/H9CH lTBfkFrAzNeVviz89xwmZKNXrwr4bqo4ByJX6IlvyEVEDW20AFr1lJeYAsr8aXPLVr8g IqrnSmvoZd0teeP6QpkJOokmKB8mi0BOyYyuKL1Q8ohygoc5CPR9toaQm4PcG+pxiu4B LnKEVAyCk3RIWDDUBEHwkRBGWBHN10F7JHM/9KuK8wgYShoCzImICtVPnE9euSUx7ceD jWnglROFNBQzxxY0jW9HnIFF0F6gE1G5AoIWJPAk9BVcIypWBLBVkwODKM8FP89JtIjm 1Rdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+qvgE2sIfcqjwtfATzaY1bT0xKhC/WxCueDg0Pzi76E=; b=cLUXFUYfri7NjyXyCtaFI+5GmQmcf5IoD/4jn8ZTjyZxmf2fQmy5JvAmOnvNJJNzbE VJKlvGERfSPql61WWZTSQ38U4TugI0nQyuNUFV6VcLGNViPIiFGB0nY80R8CYY70OPJp YL2l71ogIZ6DuCn9Gv4972MjA35EmTkmuMKD01PrMbUvradvHqEUZSEEz0fso6qt7Rpn Fvs0ln45pldpL49CgF1hF29BHXJN6ql920ZBuVnYFyXarVwGYns8E6+1uSyqR4izpfqQ VjvKCOSpjjuDTmztuy2ZcCI7UOXWtKspOJKh5bNZ4vzaFKnPOFEm+Ay9oihMMNl3aZuC 1soQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZTxuybjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si2911377edx.425.2021.03.24.18.10.53; Wed, 24 Mar 2021 18:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZTxuybjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235452AbhCXGFZ (ORCPT + 99 others); Wed, 24 Mar 2021 02:05:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:41766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233315AbhCXGEx (ORCPT ); Wed, 24 Mar 2021 02:04:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27C766192B; Wed, 24 Mar 2021 06:04:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616565892; bh=SOcYlJ+GJCugSLx/8qtddpu6enwjrjm3cFZt5Ul8FhI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZTxuybjbSx2NUQu4w05iqtSncmIBBBLc0ixcGvTUSfsPZRJPcbQ7vWQvUS7+qe8ZW iwOae9e4dDfz3nNWUcGSyJx0BWeMXqpjmqhxGIkA5/aJrqdnx45EXLYYe9jkpa4dhr 0nm1RxQAPXt3HNaBJ5kFLmxq+8LUpFjMRLygGeNs= Date: Wed, 24 Mar 2021 07:02:59 +0100 From: Greg Kroah-Hartman To: Alex Nemirovsky Cc: Jiri Slaby , Jason Li , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" Subject: Re: [PATCH 1/3] tty: serial: Add UART driver for Cortina-Access platform Message-ID: References: <1613702532-5096-1-git-send-email-alex.nemirovsky@cortina-access.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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