[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=XnpPnSToWV3f2Z-DWm2-1rdgYmDZeicGGRQD-_YjS2Bw@mail.gmail.com>
Date: Wed, 4 Sep 2024 14:51:15 -0700
From: Doug Anderson <dianders@...omium.org>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby <jirislaby@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
Nícolas F . R . A . Prado <nfraprado@...labora.com>,
linux-arm-msm@...r.kernel.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 6/8] serial: qcom-geni: fix console corruption
Hi,
On Mon, Sep 2, 2024 at 8:26 AM Johan Hovold <johan+linaro@...nel.org> wrote:
>
> +static void qcom_geni_serial_drain_fifo(struct uart_port *uport)
> +{
> + struct qcom_geni_serial_port *port = to_dev_port(uport);
> +
> + if (!qcom_geni_serial_main_active(uport))
> + return;
It seems like all callers already do the check and only ever call you
if the port is active. Do you really need to re-check?
> @@ -308,6 +311,17 @@ static bool qcom_geni_serial_poll_bit(struct uart_port *uport,
> return qcom_geni_serial_poll_bitfield(uport, offset, field, set ? field : 0);
> }
>
> +static void qcom_geni_serial_drain_fifo(struct uart_port *uport)
> +{
> + struct qcom_geni_serial_port *port = to_dev_port(uport);
> +
> + if (!qcom_geni_serial_main_active(uport))
> + return;
> +
> + qcom_geni_serial_poll_bitfield(uport, SE_GENI_M_GP_LENGTH, GP_LENGTH,
> + port->tx_queued);
nit: indent "port->tx_queued" to match open parenthesis?
...also: as the kernel test robot reported, w/ certain CONFIGs this is
defined / not used.
Aside from the nit / robot issue, this solution looks reasonable to
me. It's been long enough that I've already paged out much of the past
digging I did into this driver, but this seems like it should work.
Feel free to add my Reviewed-by when the robot issue is fixed.
-Doug
Powered by blists - more mailing lists