Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1349749rwd; Thu, 15 Jun 2023 09:20:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DcSwUM/ip1aKpFJ8og9UiTkq6C/pVQIUy0bNRfy/vEKzuuaC1Q7waJu6xiRn6IbqeC9QZ X-Received: by 2002:a17:907:60d3:b0:978:8937:19ba with SMTP id hv19-20020a17090760d300b00978893719bamr20332845ejc.44.1686846031466; Thu, 15 Jun 2023 09:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686846031; cv=none; d=google.com; s=arc-20160816; b=Z0jipOYY4Vajx8mF9vbNqqSs9NPYMTb6b+3G8x8EnmGOLeCd/KZAsJIuFqrDZlfsVD UxanDlOlXaR1A6tY9rB93zK7nrY2wqEzei06OTWrKy1G7951SPej95X/LZHGbESb9mie n8Gkt9zXG6ATWMKOpiZTCBaISNPyz0YIBSgpsGuOhWWdYsUDa3zTeexlW5gGZRIHeYVq O+R1tt+O8CGQPJY8UWZskl4q6jsAebCURpZULmrP4CqSXBpOIpfw0g6kmuJxNYoxJSZr VWC4bIAXW3jAlR9goNC3Z8hzTLjEqNvOtUHJffYulSBjExA3Ns6eCJUkH6TEvFJNXl4r ZaVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=lHVIyGJZwQS/ccpsXhg4DiZBGnwWrcAVNBqEwRIBymY=; b=khqnon5vetK3MvvCq3FOrfZOniwIb8SYdZ6AcsTPTyW8hx87uOGQbvsJ1V4J4+lMoi vVNI9Q9lyznGJX2oyvaQVQiYAgTIitTwg7dZUuX2YJAtKLoBVJN9/lz+z9X6SPKtOX28 IUT3gsN6Vjj8+hnm4ZH+kmMAjlTtvggSXZ1ScRcyKaQ1XxRv2oqmOogwczU4QeEVRi9o 97js//9NN0s1SjbHpQlkUihMfA+jHzEjG3UAI36y3tr7yn4VStFd5M5IIekEOsDWfMHr eOuA4n/k2Qg2yQBaLv/4/9V8Ympq6R/pc05qv5ruQcaU/ryvX+E1aU+4BME4zXaEYVJn 6A+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=qx9b2YnF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=KwNQpUWn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v24-20020a170906339800b009787062562esi9387726eja.585.2023.06.15.09.20.06; Thu, 15 Jun 2023 09:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=qx9b2YnF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=KwNQpUWn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjFOQMF (ORCPT + 99 others); Thu, 15 Jun 2023 12:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbjFOQMD (ORCPT ); Thu, 15 Jun 2023 12:12:03 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A27219B5; Thu, 15 Jun 2023 09:12:02 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 454455C00E0; Thu, 15 Jun 2023 12:11:59 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 15 Jun 2023 12:11:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1686845519; x=1686931919; bh=lH VIyGJZwQS/ccpsXhg4DiZBGnwWrcAVNBqEwRIBymY=; b=qx9b2YnF22o7BTBU6c wPvv52FoKIQi6NZwVUQiXnBjYmPIdS6sUykEGDFA3Z2gZ7YZKqo44XZAmTBqfwQL Op3nd3Nm9Hw45SMphvKjSLFXSD4gMFJbkRH6U3djb0/9YNByRtoMlxFzxDQoEoV5 PTMNoCgcpdJpCbmAlA6nTfRBUB0prkTGG1T1TPy37dlARa9bILaO2mgwTMk94/o7 m8areMmDxQRhUQH9WIXqnKfLqbEUR7OcQvcLd11I2Rdj5h0afp80iC6eQZnmAu9z F69XMrnr9NiGpMWaaqumUr321hIq1yaQQcOu3R10kzTV34sAwRe0AUkbl3qlApER X8EA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686845519; x=1686931919; bh=lHVIyGJZwQS/c cpsXhg4DiZBGnwWrcAVNBqEwRIBymY=; b=KwNQpUWnShH4M58lpUU6/3m+GZkTH nlIe1cv/fTjc2oAdYcp8ODnc0Abrq07vQ/3Yu7CFE88TlGFY7+gak50SAM/5Zs6f 13aicZmcf/fah/KbUd8uLgaYz1iy8vZAY6Ko8EflGnHxu7bbIt5mf213D8OfWs54 CClTnHm5YLJjrUEmHXK/kbyfR7XuxkWrEcG2ugwnUDPXmNdPG7e6zns6Vbv0ogeM QVzHc8pWMCY7FoCxDagWn/jPj9HxRH/InGH6m+ly6yvnLQWNlqpnEyOVOM50Q3Hj DQGDblBFEkLh4OOFA6XE84QZuV75jZc+zvr9YmihYpgz76KUENuAMpWTA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvvddgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6F379B60089; Thu, 15 Jun 2023 12:11:57 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-496-g8c46984af0-fm-20230615.001-g8c46984a Mime-Version: 1.0 Message-Id: <9fecce53-fc7d-4783-9e05-509b1b418589@app.fastmail.com> In-Reply-To: <2023061500-tipper-tightwad-8843@gregkh> References: <20230612025355.547871-1-ychuang570808@gmail.com> <20230612025355.547871-2-ychuang570808@gmail.com> <2023061338-lunchbox-snorkel-e6a9@gregkh> <2023061356-matchbook-footwear-d142@gregkh> <35e768ad-7f15-48a4-9c38-09570026cf71@app.fastmail.com> <2023061555-enlighten-worshiper-c92d@gregkh> <502240f7-2cac-4fe6-9e27-f9861db3666d@app.fastmail.com> <2023061500-tipper-tightwad-8843@gregkh> Date: Thu, 15 Jun 2023 18:11:36 +0200 From: "Arnd Bergmann" To: "Greg Kroah-Hartman" Cc: "Jacky Huang" , "Rob Herring" , krzysztof.kozlowski+dt@linaro.org, "Lee Jones" , "Michael Turquette" , "Stephen Boyd" , "Philipp Zabel" , "Jiri Slaby" , "Tomer Maimon" , "Catalin Marinas" , "Will Deacon" , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, soc@kernel.org, schung@nuvoton.com, mjchen@nuvoton.com, "Jacky Huang" Subject: Re: [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 15, 2023, at 17:00, Greg Kroah-Hartman wrote: > On Thu, Jun 15, 2023 at 04:01:55PM +0200, Arnd Bergmann wrote: >> Since the number is exported to userspace in serial_struct, >> it might be better to pick a new constant such as >> >> #define PORT_SERIAL_GENERIC (-1) >> >> in order to be less ambiguous. It's a signed integer, so -1 >> would work here this would clearly be a special value, or >> another option might be to use 255 as something that is >> slightly less special but still recognizable as something >> that may have a special meaning. > > A new constant would be good, 255 is nice, and then we can move everyone > to use it unless they can specifically show a reason why it will not > work for them. > > I think originally this was used to do device-specific ioctls, right? > That shouldn't be happening anymore, hopefully... The only thing I could find is that you can use TIOCSSERIAL to set the type between the supported types within a driver, which changes the behavior in some cases, e.g. the exact size and layout of the register file or its capabilities. We may need a proper audit of TIOCSSERIAL anyway, I suspect there are worse things you can do with other settings. Arnd