Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1142912rdb; Fri, 1 Dec 2023 08:04:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IG92j+jw++m7kozkteid5I4ihWcXfHSrhig3pjs63exSb7mt1br7klcBW/JouLeXJYDPoW5 X-Received: by 2002:a05:6a20:8f0f:b0:18c:531a:a503 with SMTP id b15-20020a056a208f0f00b0018c531aa503mr23981037pzk.2.1701446686935; Fri, 01 Dec 2023 08:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701446686; cv=none; d=google.com; s=arc-20160816; b=TsdtAJF7yA70RStXqvPLaKo4HBlyHsX78pjMS4Q7DiztaeN+bMn5GNKkTjnbYNQP+C YCxcRbeoKbRLnAx/tGNrwU7EtZtOcVjBTb2FZv7RmRUG0ELD4tPWSyM5W17HgcPsyVkZ fJor+HwP8+QCsYUzyvN4ngMvYV5h+2kb3496EOv3XgZ06PTVHif2/6mCM5ZAWYDrhPi8 jr2MfEOKWYazWADEaOnMmKUf5QyD26osw7AKO6tFZ//Fnegxl23sNPo2s3c1ICePjGzp A2CcHLYRk5XgztQadT4AfYUje9/2hA6HBOgm5DYPD6mcQbTT99QGHFpkS4gr2YBCIXPy eVcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent :organization:references:in-reply-to:message-id:mime-version:date :subject:cc:to:from:dkim-signature; bh=Uyp2Fb4Zn3ZB6NGD6IROczrgrgscb7OSUvgqaCDohCs=; fh=JqUbQJKXepDoO6ANWJz75jjzqIVDcBZlyn7/mmduuAA=; b=kT1RTUgzwmkX2pdDmA86U/qDtGGqx9WdDsKqN9CsAS20PTJStN2lrLCRMz51My7KlT jGqq6lkClekSq0tIKCmcRTSNxkDF77Zdq80lP5Rf6Ury0FX8QVN7Vzj5qGhhc+nAW3C1 8V5BndQ3vBsqxWcz/xH9STm3AAVCto61neXB9LlvZsM1VlDzZ1Vw5R0Xp7kyoRqxov1g Asqam9iuxEUVI7iNqX7HGpZAm2oDKABAsnZJJJW3UWGdVtudrWF+XFHJ9fhHk8gLUHCp 1uPAKUrLm1XtVNEeHiOZ/iQqk+y2g6xj4SYxauE0znvF7gICbeAfAJT3RbDo0mFVyzJZ +fMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cesnet.cz header.s=office2-2020 header.b=Tqq3yAcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cesnet.cz Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u2-20020a656702000000b005c289c5cb5esi3488359pgf.762.2023.12.01.08.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 08:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@cesnet.cz header.s=office2-2020 header.b=Tqq3yAcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cesnet.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D6A7881CAFAA; Fri, 1 Dec 2023 08:04:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjLAQES (ORCPT + 99 others); Fri, 1 Dec 2023 11:04:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbjLAQEQ (ORCPT ); Fri, 1 Dec 2023 11:04:16 -0500 X-Greylist: delayed 492 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 01 Dec 2023 08:04:22 PST Received: from office2.cesnet.cz (office2.cesnet.cz [78.128.248.237]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3625A10D0; Fri, 1 Dec 2023 08:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1701446660; bh=Uyp2Fb4Zn3ZB6NGD6IROczrgrgscb7OSUvgqaCDohCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Tqq3yAcIv4KzR4ypIqS9gU3N79tbQQZ0LiSegwdkq5E7JScw/hyoESbFiDZnHb3p9 BZkHochj41Fw1ouwuhEiU/qm9PMYKXSd2oP9Aqod81FqG+GnwjBxjOUGZKl9pUcOkB ACA3XQDcXe2k1Iq0J2v4hwYPnL9wR83v0Ck3im7nU1A/vimvAC7VQeJLWC0lf6tXq3 Yd86vqXvcCGaxKLlOJWnmF0WtWN545to+gOpbSzKbHro2TiQzaBPu9gjgB+r3sLrlc o3ZUy3LuGr3JAaWypPbI4Wi0EXGYO3lU4EMBCHdPiJKc+VYQHN8sHEAr8ccvdRoQ4C odc3Sduo4LvgA== Received: from localhost (tlha232.cesnet.cz [IPv6:2001:718:1:6::134:232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 94023118007E; Fri, 1 Dec 2023 17:04:15 +0100 (CET) From: =?iso-8859-1?Q?Jan_Kundr=E1t?= To: Hugo Villeneuve Cc: Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , , Subject: Re: [PATCH] serial: max310x: change confusing comment about Tx FIFO Date: Fri, 01 Dec 2023 17:04:15 +0100 MIME-Version: 1.0 Message-ID: In-Reply-To: <20231122175957.3875102-1-hugo@hugovil.com> References: <20231122175957.3875102-1-hugo@hugovil.com> Organization: CESNET User-Agent: Trojita/unstable-2022-08-22; Qt/5.15.10; wayland; Linux; Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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]); Fri, 01 Dec 2023 08:04:38 -0800 (PST) On st=C5=99eda 22. listopadu 2023 18:59:56 CET, Hugo Villeneuve wrote: > From: Hugo Villeneuve > > The comment wording can be confusing, as txlen will return the number of > bytes available in the FIFO, which can be less than the maximum theoretical= > Tx FIFO size. This (commit) message is confusing, too, IMHO, because `txlen` is the=20 number of bytes that are currently waiting in the TX FIFO. So that number=20 is "available" for the HW UART to pick up and send, but it's not a number=20 of bytes that's "available" in the FIFO for host to push more bytes to. I=20 guess you might want to tweak that description here. Cheers, Jan > > Change the comment so that it is unambiguous. > > Signed-off-by: Hugo Villeneuve > --- > drivers/tty/serial/max310x.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c > index 97e4965b73d4..f3a99daebdaa 100644 > --- a/drivers/tty/serial/max310x.c > +++ b/drivers/tty/serial/max310x.c > @@ -780,7 +780,7 @@ static void max310x_handle_tx(struct uart_port *port) > =09to_send =3D uart_circ_chars_pending(xmit); > =09until_end =3D CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); > =09if (likely(to_send)) { > -=09=09/* Limit to size of TX FIFO */ > +=09=09/* Limit to space available in TX FIFO */ > =09=09txlen =3D max310x_port_read(port, MAX310X_TXFIFOLVL_REG); > =09=09txlen =3D port->fifosize - txlen; > =09=09to_send =3D (to_send > txlen) ? txlen : to_send; > > base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263