Messages in this thread | | | Date | Thu, 1 Sep 2022 09:04:02 +0200 | From | Robert Richter <> | Subject | Re: [PATCH 10/15] cxl/acpi: Extract the RCH's RCRB base address from CEDT |
| |
On 31.08.22 12:09:09, Jonathan Cameron wrote: > On Wed, 31 Aug 2022 10:15:58 +0200 > Robert Richter <rrichter@amd.com> wrote:
> > static int __init cxl_restricted_host_probe(struct platform_device *pdev) > > { > > struct pci_host_bridge *host = NULL; > > struct acpi_device *adev; > > unsigned long long uid = ~0; > > + resource_size_t rcrb; > > Some of these could be made local to the while loop to reduce their scope.
I would need to move most of the vars into the loop then. So I rather want to keep it as it is.
I also remember a compiler or code checker complaining about block declaration, though it is in the c standard.
-Robert
> > > > while ((host = cxl_find_next_rch(host)) != NULL) { > > adev = ACPI_COMPANION(&host->dev); > > @@ -382,6 +419,12 @@ static int __init cxl_restricted_host_probe(struct platform_device *pdev) > > if (uid > U32_MAX) > > continue; > > > > + rcrb = cxl_get_rcrb(uid); > > + if (!rcrb) > > + continue; > > + > > + dev_dbg(&host->dev, "RCRB found: 0x%08llx\n", (u64)rcrb); > > + > > dev_info(&host->dev, "host supports CXL\n"); > > } > > >
| |