Re: [PATCH v3 1/2] iommu/arm-smmu-v3: Fix CMDQ timeout warning
From: Jacob Pan
Date: Wed Nov 05 2025 - 16:22:04 EST
Hi Nicolin,
On Wed, 5 Nov 2025 11:44:25 -0800
Nicolin Chen <nicolinc@xxxxxxxxxx> wrote:
> On Wed, Nov 05, 2025 at 11:06:37AM -0800, Jacob Pan wrote:
> > + ret = queue_poll(qp);
> > + if (ret == -ETIMEDOUT) {
> > + dev_err_ratelimited(smmu->dev, "CMDQ timed out,
> > cons: %08x, prod: 0x%08x\n",
> > + llq->cons, llq->prod);
> > + /* Restart the timer */
> > + queue_poll_init(smmu, qp);
> > + } else if (ret) {
> > + dev_err_ratelimited(smmu->dev, "CMDQ poll error
> > %d\n", ret);
>
> I don't think you need this "if (ret)", as queue_poll() returns
> either 0 or -ETIMEOUT. And the patch that I shared with you has
> this noted clearly.
I agree it is not needed for now. But in general it is more robust not
to assume return value never changes.
I can delete that.
Thanks,
Jacob