On 7/31/19 11:50 AM, Nathan Chancellor wrote:
> arm allyesconfig warns:
>
> WARNING: unmet direct dependencies detected for MDIO_OCTEON
> Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y]
> && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=y]
> Selected by [y]:
> - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC &&
> NETDEVICES [=y] || COMPILE_TEST [=y])
>
> and errors:
>
> In file included from ../drivers/net/phy/mdio-octeon.c:14:
> ../drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':
> ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of
> function 'writeq'; did you mean 'writeb'?
> [-Werror=implicit-function-declaration]
> 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
> | ^~~~~~
> ../drivers/net/phy/mdio-octeon.c:56:2: note: in expansion of macro
> 'oct_mdio_writeq'
> 56 | oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
> | ^~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> This allows MDIO_OCTEON to be built with COMPILE_TEST as well and
> includes the proper header for readq/writeq. This does not address
> the several -Wint-to-pointer-cast and -Wpointer-to-int-cast warnings
> that appeared as a result of commit 171a9bae68c7 ("staging/octeon:
> Allow test build on !MIPS") in these files.
>
> Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS")
> Reported-by: kbuild test robot <[email protected]>
> Reported-by: Mark Brown <[email protected]>
> Reported-by: Randy Dunlap <[email protected]>
> Signed-off-by: Nathan Chancellor <[email protected]>With today's linux-next (20190731), I am still seeing a Kconfig warning and build errors (building for i386): and applying Greg's "depends on NETDEVICES" patch and this patch: WARNING: unmet direct dependencies detected for MDIO_OCTEON Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=m] && MDIO_BUS [=m] && (64BIT [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] && OF_MDIO [=n] Selected by [m]: - OCTEON_ETHERNET [=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC || COMPILE_TEST [=y]) && NETDEVICES [=y] ERROR: "cavium_mdiobus_write" [drivers/net/phy/mdio-octeon.ko] undefined! ERROR: "cavium_mdiobus_read" [drivers/net/phy/mdio-octeon.ko] undefined! kernel .config file is attached. Am I missing another patch? thanks. > --- > drivers/net/phy/Kconfig | 2 +- > drivers/net/phy/mdio-cavium.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig > index 20f14c5fbb7e..ed2edf4b5b0e 100644 > --- a/drivers/net/phy/Kconfig > +++ b/drivers/net/phy/Kconfig > @@ -159,7 +159,7 @@ config MDIO_MSCC_MIIM > > config MDIO_OCTEON > tristate "Octeon and some ThunderX SOCs MDIO buses" > - depends on 64BIT > + depends on 64BIT || COMPILE_TEST > depends on HAS_IOMEM && OF_MDIO > select MDIO_CAVIUM > help > diff --git a/drivers/net/phy/mdio-cavium.h b/drivers/net/phy/mdio-cavium.h > index ed5f9bb5448d..b7f89ad27465 100644 > --- a/drivers/net/phy/mdio-cavium.h > +++ b/drivers/net/phy/mdio-cavium.h > @@ -108,6 +108,8 @@ static inline u64 oct_mdio_readq(u64 addr) > return cvmx_read_csr(addr); > } > #else > +#include <linux/io-64-nonatomic-lo-hi.h> > + > #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) > #define oct_mdio_readq(addr) readq((void *)addr) > #endif > -- ~Randy
cavium.i386.config
Description: application/config
