Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: "Johan Hovold" <johan+linaro@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
	linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 6/8] serial: qcom-geni: fix console corruption
Date: Thu, 5 Sep 2024 10:57:41 +0200	[thread overview]
Message-ID: <ZtlyhQ2HNk8unxNI@hovoldconsulting.com> (raw)
In-Reply-To: <CAD=FV=XnpPnSToWV3f2Z-DWm2-1rdgYmDZeicGGRQD-_YjS2Bw@mail.gmail.com>

On Wed, Sep 04, 2024 at 02:51:15PM -0700, Doug Anderson wrote:
> On Mon, Sep 2, 2024 at 8:26 AM Johan Hovold <johan+linaro@kernel.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?

I wanted to make the helper self-contained and work in both cases. But
since I ended up only using this helper only in the console code and
will need to move it anyway (under the console ifdef), perhaps I can
consider dropping it. But then again, it's just one register read.

> > @@ -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?

No, I don't use open-parenthesis alignment unless that's the
(consistent) style of the code I'm changing (e.g. to avoid unnecessary
realignments when symbol names change and to make a point about
checkpatch --pedantic warnings not being part of the coding style).
 
> ...also: as the kernel test robot reported, w/ certain CONFIGs this is
> defined / not used.

Yes, I need to move the helper under the console ifdef. I was just
waiting to see if there was any further feedback before respinning.

> 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.

Thanks for reviewing.

Johan

  reply	other threads:[~2024-09-05  8:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 15:24 [PATCH 0/8] serial: qcom-geni: fix console corruption Johan Hovold
2024-09-02 15:24 ` [PATCH 1/8] serial: qcom-geni: fix fifo polling timeout Johan Hovold
2024-09-04 21:50   ` Doug Anderson
2024-09-05  8:48     ` Johan Hovold
2024-09-06 13:23       ` Johan Hovold
2024-09-02 15:24 ` [PATCH 2/8] serial: qcom-geni: fix false console tx restart Johan Hovold
2024-09-04 21:51   ` Doug Anderson
2024-09-02 15:24 ` [PATCH 3/8] soc: qcom: geni-se: add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers Johan Hovold
2024-09-02 15:24 ` [PATCH 4/8] serial: qcom-geni: fix arg types for qcom_geni_serial_poll_bit() Johan Hovold
2024-09-02 15:24 ` [PATCH 5/8] serial: qcom-geni: introduce qcom_geni_serial_poll_bitfield() Johan Hovold
2024-09-02 15:24 ` [PATCH 6/8] serial: qcom-geni: fix console corruption Johan Hovold
2024-09-03  8:33   ` kernel test robot
2024-09-04 21:51   ` Doug Anderson
2024-09-05  8:57     ` Johan Hovold [this message]
2024-09-02 15:24 ` [PATCH 7/8] serial: qcom-geni: disable interrupts during console writes Johan Hovold
2024-09-04 21:51   ` Doug Anderson
2024-09-02 15:24 ` [PATCH 8/8] serial: qcom-geni: fix polled console corruption Johan Hovold
2024-09-04 21:51   ` Doug Anderson
2024-09-04 18:08 ` [PATCH 0/8] serial: qcom-geni: fix " Nícolas F. R. A. Prado
2024-09-05  8:15   ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZtlyhQ2HNk8unxNI@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nfraprado@collabora.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox