Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp158375rdb; Tue, 31 Oct 2023 04:04:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRcMXLfn+bqNIUG/qL3XR91CslKFXaO1WxVRwhfFepUs2KxzwpLOUCJ8xfS4pj8gv7WqJs X-Received: by 2002:a17:902:ea0e:b0:1cc:47a6:12bf with SMTP id s14-20020a170902ea0e00b001cc47a612bfmr5084161plg.47.1698750265534; Tue, 31 Oct 2023 04:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698750265; cv=none; d=google.com; s=arc-20160816; b=dLTrNO/xHvBv4Q3tS0mWy8yv8qMr7P9B/P4L2L9GWSNetwPit9NeP1MqAs/N1C853E dBP9fF38RKlh4se7D4u6zNpt9MnGi/ih8zp8dT4b/vloOtyS/h2kOrJCmA9ZTHBSvv2w BbelojrHMGtoCSJ1wsyEYbKFgYjhgsXDsBrAnGCnJYrAb1uVxfB+zrDESmD/Ppkr1sj1 y/kpzJr35Oiva5gRSEackJ3yixNo8r3okuh5Qd/a+AhQ/l+nIhSItpRvcNNUFZQBlfzt SrIF4yYqtlZfles0Cbd6869fYXLCJWdjzrLlpIcv/m6VWdizSBdnYzlSXVorNcddllHD 7LAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:cc:subject:from:to :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=gdH4ndnFFRWypp8VD9egRiAHe4ArCrVlink+NxvjNco=; fh=DhqEiVbHsIQJkhhVxam5+gQQJbVWivA6e+6MRqaLa1A=; b=jGSNpgcdqLHWV8ebnDsjTzP3RXSDVZOv/ztGAbYgQ4hNEKFeQEurXgPPH3G2li6zS9 mlTdmnQFE8voGWO4hsgg479LnwcNv29XQv/4vlXm0dYthS0tJ45a3/mxKZnKagE0FsOC rpPHYWVCYFrJlU0vcbsKQRj6eJikB8SIu0x5gYb4VjVwmtV2ZKbRUrikagrL0fQtjlYF iTMGQWcS5Dp0EfgCOr0PRLdwCR66NjFW+4wzBEhkvDx24RNVoRQfb3jdmHWNytD/samp 5en8WI+hlqtVQo7XDMQckub5eYKw5YXJwImM+Ol3E1cjuUyEtt2MYRjRsDzSATGEWxOx bZSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=no2UbQfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id t19-20020a170902e1d300b001ca93040adbsi824972pla.653.2023.10.31.04.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 04:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=no2UbQfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DC0FC80245A5; Tue, 31 Oct 2023 04:04:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233784AbjJaLES (ORCPT + 99 others); Tue, 31 Oct 2023 07:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbjJaLER (ORCPT ); Tue, 31 Oct 2023 07:04:17 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E36FADF; Tue, 31 Oct 2023 04:04:13 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id B274DC0004; Tue, 31 Oct 2023 11:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698750252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gdH4ndnFFRWypp8VD9egRiAHe4ArCrVlink+NxvjNco=; b=no2UbQfmYmQ2oPoObwHZxxMVuHKMSVsWQe132gKW10ZGKFXxzq0kwps2F6wSOZIaIO64ik VZG2v1zF6eCg8tDHWodzkVlLvniRTEpZQgOTCQc+az8n+3UA4FjLvnk0KsIr1LQBzBzdf5 O+EPcNvxzAR+Bhfw6dkmZ4jrLuGongRNvs5O6hybHt0tLzUrC9VZ8KytwLVd+v5F2G8GmF NCMJjPTemcZJSnfyeOGCADmvePqv/hIdGTQwiHeoVLfeEbfROqBgpIlbbwDvTT3Gjdu31R rP0eA33xpw8kQop64lorh9I8+fHoz61QCfzCFi7iL7peifhHnI4ZEEz1sygWzw== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 31 Oct 2023 12:04:11 +0100 Message-Id: To: "Russell King (Oracle)" From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6, 7 or 8 in _get_options Cc: "Hugo Villeneuve" , "Greg Kroah-Hartman" , "Jiri Slaby" , , , "Linus Walleij" , "Gregory CLEMENT" , "Alexandre Belloni" , "Thomas Petazzoni" , "Vladimir Kondratiev" , "Tawfik Bayouk" X-Mailer: aerc 0.15.2 References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> <20231026105329.0ee9603563202bd2157a7d27@hugovil.com> In-Reply-To: X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 04:04:23 -0700 (PDT) Hello, On Tue Oct 31, 2023 at 11:11 AM CET, Russell King (Oracle) wrote: > There is no point in supporting 5 or 6 bits for console usage. Think > about it. What values are going to be sent over the console? It'll be > ASCII, which requires at _least_ 7-bit. 6-bit would turn alpha > characters into control characters, punctuation and numbers. 5-bit > would be all control characters. > > So there's no point trying to do anything with 5 or 6 bits per byte, > and I decided we might as well take that as an error (or maybe a > case that the hardware has not been setup) and default to 8 bits per > byte. I see your point. Two things come to mind: - I added this parsing of 5/6 bits to be symmetrical with pl011_set_termios that handles 5/6 properly. Should pl011_set_termios be modified then? - If a value of 5 or 6 means the hardware has not been setup, shouldn't we ignore all other parsed values? If you decide to keep the current behavior, I'd be down to adding a comment to explicit this choice in pl011_console_get_options. Regards, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ------------------------------------------------------------------------