Re: [PATCH v8 4/6] PCI: tegra: Add Tegra264 support
Bjorn Helgaas <[email protected]> Wed, 22 Jul 2026 11:44:42 -0500
| Newsgroups | org.kernel.vger.linux-tegra,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <20260722164442.GA742885@bhelgaas> |
On Thu, Jul 16, 2026 at 07:07:15PM +0200, Thierry Reding wrote: > From: Thierry Reding <[email protected]> > > Add a driver for the PCIe controller found on NVIDIA Tegra264 SoCs. The > driver is very small, with its main purpose being to set up the address > translation registers and then creating a standard PCI host using ECAM. > ... > + * The various memory regions used by the controller (I/O, memory, ECAM) are > + * set up during early boot and have hardware-level protections in place. If > + * the DT ranges don't match what's been setup, the controller won't be able > + * to write the address endpoints properly, so make sure to validate that DT > + * and firmware programming agree on these ranges. > + */ > +static bool tegra264_pcie_check_ranges(struct platform_device *pdev) Drive-by comment: I have a bit of an aversion to boolean functions named "check" because "check" is not a predicate with a true/false or yes/no answer. "true" usually means success, which is the opposite of functions that return 0 for success. In this case, it looks like "if (tegra264_pcie_check_ranges())" means the DT ranges match the hardware configuration. If it were named "tegra264_pcie_valid_ranges()" or similar, an "if" test like that would read better.