Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5727248ybh; Wed, 7 Aug 2019 10:22:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8rty8AzFZm4mtXcTcNQv8/gYPq5u/URTSYpFmsuR2vgDaF2bRoUpp7rnYDg4Q5K4rTxk2 X-Received: by 2002:aa7:9a92:: with SMTP id w18mr10442222pfi.167.1565198527821; Wed, 07 Aug 2019 10:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565198527; cv=none; d=google.com; s=arc-20160816; b=BqACSbB3i2GAwszdMy+ksVHrcan+IWZnvzdCBxsg1HaQzW/ZOw2Lp9eBeuotTgBMSi Koz9bFauVA0daFFy0k03u3cpbr0la8G+yQL2dJTztvsiyENdujuFwqR8jBIzBemk5pj1 VkRmE6L6JnaEjWwK5W/mKKp8CgfZVWZGugn1mwOFH9eDtMWcdoS66CiYj6cmNEiz3RND 8tEy3PSPk91n4e3qZI+iVlo6kO4eMLa3Krm4v+n6Imq7Q6KHjAIUprPkICxkPeMjYJ0Q hVmqEKzlosS84YpNMhFCqMEayUwHZ9T89bdjCSxM69T87miK7R0GqhLNS9lsnKw3iJP9 f54w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GV50jFfnD61TeozG6lFEGoBfJ+yXbbn9QsvsWCB4n8I=; b=KjqezecoMHnk/RIHYODqfWrqp0dQAeGAaL/lX90dxOkE6yfIjMWbr/T4RqC6Dr67eb TAn4s5wOof6OSgejbXNWj9dNA8sj9C/jR/Ox+73+qIwbnCrLB72VNLxFRssPujQcp5WG x+XJ4ESepxpS/5sKNobwCvyr7u2kB/ggsmP1gneLts6Cgaj1+oYW4lcrORkbV01OHETE CcZSKr7naw0kUAfI2evQNejbdjpaZNrXwQaU9f5ka9+SKOXQWAc2W5pGOduYnivqcl+f RVgWr4v5XnB1yi+T4jrzknXcLv0mEk2XDtlYPjj3tQw/PFh8AP/bt/ub3EwqZl0VW95G 6ySw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xkB1X1iS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si349595pjn.96.2019.08.07.10.21.51; Wed, 07 Aug 2019 10:22:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xkB1X1iS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389029AbfHGQ4t (ORCPT + 99 others); Wed, 7 Aug 2019 12:56:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:44354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388898AbfHGQ4t (ORCPT ); Wed, 7 Aug 2019 12:56:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 128DA222FC; Wed, 7 Aug 2019 16:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565197008; bh=hvVL8ffc/jpc+bF4/4PHu60D06JAOf/K78E9+2Cf9VY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xkB1X1iSl56LQP0CBIj5/L1p7RUnNbaRbYHyuBNqZBjc6i2nazIdJ5qcCCP/LJY0i dW9wJ0yKIT6CwqGXaPDJKk/WkPMNzesKuItpcDpzHmSWVFsc4YMpt9MMJf/ZsaFKR5 N1wzPceAsL2UfeGslE7K62fzZnnAwBV3SH5To17o= Date: Wed, 7 Aug 2019 18:56:46 +0200 From: "gregkh@linuxfoundation.org" To: Stefan-gabriel Mirea Cc: "corbet@lwn.net" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will@kernel.org" , "shawnguo@kernel.org" , Leo Li , "jslaby@suse.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-serial@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Cosmin Stefan Stoica , Larisa Ileana Grigore Subject: Re: [PATCH 5/6] tty: serial: Add linflexuart driver for S32V234 Message-ID: <20190807165646.GA6584@kroah.com> References: <20190802194702.30249-1-stefan-gabriel.mirea@nxp.com> <20190802194702.30249-6-stefan-gabriel.mirea@nxp.com> <20190805153114.GA16836@kroah.com> <20190806184042.GA26041@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 07, 2019 at 04:42:17PM +0000, Stefan-gabriel Mirea wrote: > On 8/6/2019 9:40 PM, gregkh@linuxfoundation.org wrote: > > On Tue, Aug 06, 2019 at 05:11:17PM +0000, Stefan-gabriel Mirea wrote: > >> On 8/5/2019 6:31 PM, gregkh@linuxfoundation.org wrote: > >>> On Fri, Aug 02, 2019 at 07:47:23PM +0000, Stefan-gabriel Mirea wrote: > >>>> > >>>> +/* Freescale Linflex UART */ > >>>> +#define PORT_LINFLEXUART 121 > >>> > >>> Do you really need this modified? > >> > >> Hello Greg, > >> > >> This macro is meant to be assigned to port->type in the config_port > >> method from uart_ops, in order for verify_port to know if the received > >> serial_struct structure was really targeted for a LINFlex port. It > >> needs to be defined outside, to avoid "collisions" with other drivers. > > > > Yes, I know what it goes to, but does anyone in userspace actually use > > it? > > No, we do not use it from userspace, but kept the pattern only for > conformance. > > >> Other than that, I do not see anything wrong with the addition of a > >> define in serial_core.h for this purpose (which is also what most of the > >> serial drivers do, including amba-pl011.c, mentioned in > >> Documentation/driver-api/serial/driver.rst as providing the reference > >> implementation), so please be more specific. > > > > I am getting tired of dealing with merge issues with that list, and no > > one seems to be able to find where they are really needed for userspace, > > especially for new devices. What happens if you do not have use it? > > I see. If I drop its usage completely and leave 'type' from the > uart_port as 0, uart_port_startup() will fail when finding that > uport->type == PORT_UNKNOWN at [1] (there may be other effects as well, > e.g. due to the check in uart_configure_port[2]). > > So I suppose that I need to define some nonzero 'PORT_KNOWN' macro in > the driver and use that one internally for 'type'. Is my understanding > correct? Will there be any problems if I define it to a positive integer > which is already assigned to another driver, according to serial_core.h? Ugh, ok, that's messy, nevermind. Keep the #define in there, I will try to figure out how to move all of these at once sometime in the future... sorry for the noise. greg k-h