lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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");
> > }
> >
>

\
 
 \ /
  Last update: 2022-09-01 09:06    [W:0.178 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site