lkml.org 
[lkml]   [2020]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 3/7] net/fsl: add ACPI support for mdio bus
On Tue, Feb 4, 2020 at 9:18 AM Calvin Johnson (OSS)
<calvin.johnson@oss.nxp.com> wrote:
> > -----Original Message-----
> > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Subject: Re: [PATCH v1 3/7] net/fsl: add ACPI support for mdio bus
> > On Fri, Jan 31, 2020 at 5:37 PM Calvin Johnson <calvin.johnson@nxp.com>
> > wrote:

...

> > > - snprintf(bus->id, MII_BUS_ID_SIZE, "%llx", (unsigned long
> > long)res.start);
> > > + snprintf(bus->id, MII_BUS_ID_SIZE, "%llx",
> > > + (unsigned long long)res->start);
> >
> > Why this has been touched?
>
> Without this change, I get:
> ---------------------------------------------------------
> drivers/net/ethernet/freescale/xgmac_mdio.c: In function 'xgmac_mdio_probe':
> drivers/net/ethernet/freescale/xgmac_mdio.c:269:27: error: request for member 'start' in something not a structure or union
> (unsigned long long)res.start);
> ^
> scripts/Makefile.build:265: recipe for target 'drivers/net/ethernet/freescale/xgmac_mdio.o' failed
> make[4]: *** [drivers/net/ethernet/freescale/xgmac_mdio.o] Error 1
> ---------------------------------------------------------

I see. Thanks.
Can you leave it one line as it was before?

...

> > (Hint: missed terminator)
> static const struct acpi_device_id xgmac_mdio_acpi_match[] = {
> { "NXP0006", 0 },
> { }
> };
> Is this what you meant?

Yes!

...

> > > + .acpi_match_table = ACPI_PTR(xgmac_mdio_acpi_match),
> >
> > ACPI_PTR is not needed otherwise you will get a compiler warning.
>
> No compiler warning was observed in both cases.

You mean you tried CONFIG_ACPI=n and didn't get a warning about unused
static variable?
Perhaps you may run `make W=1 ...`

> I can see other drivers using this macro.

They might have hidden same issue.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-02-04 12:18    [W:0.059 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site