From: Niklas Cassel <cassel@kernel.org>
To: "Jingoo Han" <jingoohan1@gmail.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>
Cc: Randolph Lin <randolph@andestech.com>,
Samuel Holland <samuel.holland@sifive.com>,
Frank Li <Frank.Li@nxp.com>,
Charles Mirabile <cmirabil@redhat.com>,
tim609@andestech.com,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 3/4] PCI: dwc: Clean up iatu index usage in dw_pcie_iatu_setup()
Date: Thu, 22 Jan 2026 23:47:57 +0100 [thread overview]
Message-ID: <aXKpHS20vHDyh4fL@ryzen> (raw)
In-Reply-To: <20260122222914.523238-9-cassel@kernel.org>
On Thu, Jan 22, 2026 at 11:29:17PM +0100, Niklas Cassel wrote:
(snip)
> if (pp->use_atu_msg) {
> - if (pci->num_ob_windows > ++i) {
> - pp->msg_atu_index = i;
> + if (ob_iatu_index_to_use < pci->num_ob_windows) {
> + pp->msg_atu_index = ob_iatu_index_to_use;
> + ob_iatu_index_to_use++;
> } else {
> dev_err(pci->dev, "Cannot add outbound window for MSG TLP\n");
> return -ENOMEM;
> }
> }
To be even more consistent with the while loops,
this part should probably instead be written as:
if (pp->use_atu_msg) {
- if (ob_iatu_index_to_use < pci->num_ob_windows) {
- pp->msg_atu_index = ob_iatu_index_to_use;
- ob_iatu_index_to_use++;
- } else {
+ if (!(ob_iatu_index_to_use < pci->num_ob_windows)) {
dev_err(pci->dev, "Cannot add outbound window for MSG TLP\n");
return -ENOMEM;
}
+ pp->msg_atu_index = ob_iatu_index_to_use;
+ ob_iatu_index_to_use++;
}
Kind regards,
Niklas
next prev parent reply other threads:[~2026-01-22 22:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 22:29 [PATCH v2 0/4] PCI: dwc: Clean up iatu index mess Niklas Cassel
2026-01-22 22:29 ` [PATCH v2 1/4] PCI: dwc: Fix msg_atu_index assignment Niklas Cassel
2026-01-23 2:06 ` Shawn Lin
2026-01-22 22:29 ` [PATCH v2 2/4] PCI: dwc: Improve msg_atu_index error handling Niklas Cassel
2026-01-23 2:07 ` Shawn Lin
2026-01-23 7:51 ` Niklas Cassel
2026-01-22 22:29 ` [PATCH v2 3/4] PCI: dwc: Clean up iatu index usage in dw_pcie_iatu_setup() Niklas Cassel
2026-01-22 22:47 ` Niklas Cassel [this message]
2026-01-23 8:15 ` Manivannan Sadhasivam
2026-01-23 8:18 ` Niklas Cassel
2026-01-22 22:29 ` [PATCH v2 4/4] PCI: dwc: Fix missing iATU setup when ECAM is enabled Niklas Cassel
2026-01-23 8:17 ` Manivannan Sadhasivam
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=aXKpHS20vHDyh4fL@ryzen \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=cmirabil@redhat.com \
--cc=jingoohan1@gmail.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=macro@orcam.me.uk \
--cc=mani@kernel.org \
--cc=randolph@andestech.com \
--cc=robh@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=tim609@andestech.com \
/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