[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YxBZYkLzZXPCVZum@rric.localdomain>
Date: Thu, 1 Sep 2022 09:04:02 +0200
From: Robert Richter <rrichter@....com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
CC: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Ben Widawsky <bwidawsk@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
<linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
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@....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");
> > }
> >
>
Powered by blists - more mailing lists