Message ID | 20190803060155.89548-1-natechancellor@gmail.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | b8fb640643fcdb3bca84137c4cec0c649b25e056 |
Headers | show |
Series | [v2] net: mdio-octeon: Fix Kconfig warnings and build errors | expand |
On 8/2/19 11:01 PM, Nathan Chancellor wrote: > After commit 171a9bae68c7 ("staging/octeon: Allow test build on > !MIPS"), the following combination of configs cause a few Kconfig > warnings and build errors (distilled from arm allyesconfig and Randy's > randconfig builds): > > CONFIG_NETDEVICES=y > CONFIG_STAGING=y > CONFIG_COMPILE_TEST=y > > and CONFIG_OCTEON_ETHERNET as either a module or built-in. > > WARNING: unmet direct dependencies detected for MDIO_OCTEON > Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] > && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n] > Selected by [y]: > - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC || > COMPILE_TEST [=y]) && NETDEVICES [=y] > > In file included from ../drivers/net/phy/mdio-octeon.c:14: > ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of > function ‘writeq’; did you mean ‘writel’? > [-Werror=implicit-function-declaration] > 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) > | ^~~~~~ > > CONFIG_64BIT is not strictly necessary if the proper readq/writeq > definitions are included from io-64-nonatomic-lo-hi.h. > > CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because > of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h."). > > Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") > Reported-by: kbuild test robot <lkp@intel.com> > Reported-by: Mark Brown <broonie@kernel.org> > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Works for me. Fixes the reported build errors. Thanks. Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested > --- > > v1 -> v2: > > * Address Randy's reported failure here: https://lore.kernel.org/netdev/b3444283-7a77-ece8-7ac6-41756aa7dc60@infradead.org/ > by not requiring CONFIG_OF_MDIO when CONFIG_COMPILE_TEST is set. > > * Improve commit message > > drivers/net/phy/Kconfig | 4 ++-- > drivers/net/phy/mdio-cavium.h | 2 ++ > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig > index 20f14c5fbb7e..0e3d9e3d3533 100644 > --- a/drivers/net/phy/Kconfig > +++ b/drivers/net/phy/Kconfig > @@ -159,8 +159,8 @@ config MDIO_MSCC_MIIM > > config MDIO_OCTEON > tristate "Octeon and some ThunderX SOCs MDIO buses" > - depends on 64BIT > - depends on HAS_IOMEM && OF_MDIO > + depends on (64BIT && OF_MDIO) || COMPILE_TEST > + depends on HAS_IOMEM > select MDIO_CAVIUM > help > This module provides a driver for the Octeon and ThunderX MDIO > 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 >
From: Nathan Chancellor <natechancellor@gmail.com> Date: Fri, 2 Aug 2019 23:01:56 -0700 > After commit 171a9bae68c7 ("staging/octeon: Allow test build on > !MIPS"), the following combination of configs cause a few Kconfig > warnings and build errors (distilled from arm allyesconfig and Randy's > randconfig builds): > > CONFIG_NETDEVICES=y > CONFIG_STAGING=y > CONFIG_COMPILE_TEST=y > > and CONFIG_OCTEON_ETHERNET as either a module or built-in. > > WARNING: unmet direct dependencies detected for MDIO_OCTEON > Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] > && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n] > Selected by [y]: > - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC || > COMPILE_TEST [=y]) && NETDEVICES [=y] > > In file included from ../drivers/net/phy/mdio-octeon.c:14: > ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of > function ‘writeq’; did you mean ‘writel’? > [-Werror=implicit-function-declaration] > 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) > | ^~~~~~ > > CONFIG_64BIT is not strictly necessary if the proper readq/writeq > definitions are included from io-64-nonatomic-lo-hi.h. > > CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because > of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h."). > > Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") > Reported-by: kbuild test robot <lkp@intel.com> > Reported-by: Mark Brown <broonie@kernel.org> > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Applied to net-next. Please make it clear what tree your changes are targetting in the future, thank you.
On Tue, Aug 06, 2019 at 02:11:33PM -0700, David Miller wrote: > From: Nathan Chancellor <natechancellor@gmail.com> > Date: Fri, 2 Aug 2019 23:01:56 -0700 > > > After commit 171a9bae68c7 ("staging/octeon: Allow test build on > > !MIPS"), the following combination of configs cause a few Kconfig > > warnings and build errors (distilled from arm allyesconfig and Randy's > > randconfig builds): > > > > CONFIG_NETDEVICES=y > > CONFIG_STAGING=y > > CONFIG_COMPILE_TEST=y > > > > and CONFIG_OCTEON_ETHERNET as either a module or built-in. > > > > WARNING: unmet direct dependencies detected for MDIO_OCTEON > > Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] > > && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n] > > Selected by [y]: > > - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC || > > COMPILE_TEST [=y]) && NETDEVICES [=y] > > > > In file included from ../drivers/net/phy/mdio-octeon.c:14: > > ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of > > function ‘writeq’; did you mean ‘writel’? > > [-Werror=implicit-function-declaration] > > 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) > > | ^~~~~~ > > > > CONFIG_64BIT is not strictly necessary if the proper readq/writeq > > definitions are included from io-64-nonatomic-lo-hi.h. > > > > CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because > > of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h."). > > > > Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") > > Reported-by: kbuild test robot <lkp@intel.com> > > Reported-by: Mark Brown <broonie@kernel.org> > > Reported-by: Randy Dunlap <rdunlap@infradead.org> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> > > Applied to net-next. > > Please make it clear what tree your changes are targetting in the future, > thank you. Sorry for the confusion, I'll do my best to add a patch suffix in the future. Thank you for picking this up! Nathan
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 20f14c5fbb7e..0e3d9e3d3533 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -159,8 +159,8 @@ config MDIO_MSCC_MIIM config MDIO_OCTEON tristate "Octeon and some ThunderX SOCs MDIO buses" - depends on 64BIT - depends on HAS_IOMEM && OF_MDIO + depends on (64BIT && OF_MDIO) || COMPILE_TEST + depends on HAS_IOMEM select MDIO_CAVIUM help This module provides a driver for the Octeon and ThunderX MDIO 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
After commit 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a few Kconfig warnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds): CONFIG_NETDEVICES=y CONFIG_STAGING=y CONFIG_COMPILE_TEST=y and CONFIG_OCTEON_ETHERNET as either a module or built-in. WARNING: unmet direct dependencies detected for MDIO_OCTEON Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n] Selected by [y]: - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC || COMPILE_TEST [=y]) && NETDEVICES [=y] In file included from ../drivers/net/phy/mdio-octeon.c:14: ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration] 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) | ^~~~~~ CONFIG_64BIT is not strictly necessary if the proper readq/writeq definitions are included from io-64-nonatomic-lo-hi.h. CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h."). Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Mark Brown <broonie@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> --- v1 -> v2: * Address Randy's reported failure here: https://lore.kernel.org/netdev/b3444283-7a77-ece8-7ac6-41756aa7dc60@infradead.org/ by not requiring CONFIG_OF_MDIO when CONFIG_COMPILE_TEST is set. * Improve commit message drivers/net/phy/Kconfig | 4 ++-- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)