next/master build: 221 builds: 11 failed, 210 passed, 13 errors, 1174 warnings (next-20190731)
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mark Brown
maintainerOn Wed, Jul 31, 2019 at 04:07:41AM -0700, kernelci.org bot wrote:
Today's -next fails to build an ARM allmodconfig due to:
Quoted 4 lines
allmodconfig (arm, gcc-8) — FAIL, 1 error, 40 warnings, 0 section mismatches
Errors:
drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
as a result of the changes that introduced:
WARNING: unmet direct dependencies detected for MDIO_OCTEON
Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=m] && MDIO_BUS [=m] && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=m] Selected by [m]:
- OCTEON_ETHERNET [=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC && NETDEVICES [=y] || COMPILE_TEST [=y])
which is triggered by the staging OCTEON_ETHERNET driver which misses a 64BIT dependency but added COMPILE_TEST in 171a9bae68c72f2 (staging/octeon: Allow test build on !MIPS).
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Mark Brown
On Wed, Jul 31, 2019 at 04:07:41AM -0700, kernelci.org bot wrote:
Today's -next fails to build an ARM allmodconfig due to:
Quoted 4 lines
allmodconfig (arm, gcc-8) — FAIL, 1 error, 40 warnings, 0 section mismatches
Errors:
drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]as a result of the changes that introduced:
Quoted 8 lines
WARNING: unmet direct dependencies detected for
MDIO_OCTEON
Depends on [n]: NETDEVICES [=y] &&MDIO_DEVICE[=m] &&MDIO_BUS[=m] && 64BIT &&HAS_IOMEM[=y] &&OF_MDIO[=m] Selected by [m]:
-OCTEON_ETHERNET[=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC&& NETDEVICES [=y] ||COMPILE_TEST[=y])which is triggered by the staging
OCTEON_ETHERNETdriver which misses a 64BIT dependency but addedCOMPILE_TESTin171a9bae68c72f2(staging/octeon: Allow test build on !MIPS).
A patch was posted for this, but it needs to go through the netdev tree as that's where the offending patches are coming from.
thanks,
greg k-h
David Miller
maintainerFrom: Greg Kroah-Hartman <[email protected]>
Date: Wed, 31 Jul 2019 13:35:22 +0200
Quoted 17 lines · Mark Brown
Quoted 16 lines · kernelci.org bot
Today's -next fails to build an ARM allmodconfig due to:
Quoted 4 lines
allmodconfig (arm, gcc-8) ― FAIL, 1 error, 40 warnings, 0 section mismatches
Errors:
drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]as a result of the changes that introduced:
WARNING: unmet direct dependencies detected for
MDIO_OCTEON
Depends on [n]: NETDEVICES [=y] &&MDIO_DEVICE[=m] &&MDIO_BUS[=m] && 64BIT &&HAS_IOMEM[=y] &&OF_MDIO[=m] Selected by [m]:
-OCTEON_ETHERNET[=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC&& NETDEVICES [=y] ||COMPILE_TEST[=y])
Quoted 6 lines
Quoted 3 lines
which is triggered by the staging
OCTEON_ETHERNETdriver which misses a 64BIT dependency but addedCOMPILE_TESTin171a9bae68c72f2(staging/octeon: Allow test build on !MIPS).A patch was posted for this, but it needs to go through the netdev tree as that's where the offending patches are coming from.
I didn't catch that, was netdev CC:'d?
Quoted 20 lines · David Miller
From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 31 Jul 2019 13:35:22 +0200Quoted 17 lines · Mark Brown
Quoted 16 lines · kernelci.org bot
Today's -next fails to build an ARM allmodconfig due to:
Quoted 4 lines
allmodconfig (arm, gcc-8) ― FAIL, 1 error, 40 warnings, 0 section mismatches
Errors:
drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]as a result of the changes that introduced:
WARNING: unmet direct dependencies detected for
MDIO_OCTEON
Depends on [n]: NETDEVICES [=y] &&MDIO_DEVICE[=m] &&MDIO_BUS[=m] && 64BIT &&HAS_IOMEM[=y] &&OF_MDIO[=m] Selected by [m]:
-OCTEON_ETHERNET[=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC&& NETDEVICES [=y] ||COMPILE_TEST[=y])
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
which is triggered by the staging
OCTEON_ETHERNETdriver which misses a 64BIT dependency but addedCOMPILE_TESTin171a9bae68c72f2(staging/octeon: Allow test build on !MIPS).A patch was posted for this, but it needs to go through the netdev tree as that's where the offending patches are coming from.
I didn't catch that, was netdev CC:'d?
Nope, just you :(
I'll resend it now and cc: netdev.
thanks,
greg k-h
Quoted 30 lines · Greg KH
Quoted 20 lines · David Miller
From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 31 Jul 2019 13:35:22 +0200Quoted 17 lines · Mark Brown
Quoted 16 lines · kernelci.org bot
Today's -next fails to build an ARM allmodconfig due to:
Quoted 4 lines
allmodconfig (arm, gcc-8) ― FAIL, 1 error, 40 warnings, 0 section mismatches
Errors:
drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]as a result of the changes that introduced:
WARNING: unmet direct dependencies detected for
MDIO_OCTEON
Depends on [n]: NETDEVICES [=y] &&MDIO_DEVICE[=m] &&MDIO_BUS[=m] && 64BIT &&HAS_IOMEM[=y] &&OF_MDIO[=m] Selected by [m]:
-OCTEON_ETHERNET[=m] && STAGING [=y] && (CAVIUM_OCTEON_SOC&& NETDEVICES [=y] ||COMPILE_TEST[=y])Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
which is triggered by the staging
OCTEON_ETHERNETdriver which misses a 64BIT dependency but addedCOMPILE_TESTin171a9bae68c72f2(staging/octeon: Allow test build on !MIPS).A patch was posted for this, but it needs to go through the netdev tree as that's where the offending patches are coming from.
I didn't catch that, was netdev CC:'d?
Quoted 7 lines
Nope, just you :(
I'll resend it now and cc: netdev.
thanks,
greg k-h
If it is this patch:
https://lore.kernel.org/netdev/[email protected]/
It doesn't resolve that issue. I applied it and tested on next-20190731.
$ make -j$(nproc) -s ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=out distclean allyesconfig drivers/net/phy/
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 || COMPILE_TEST [=y]) && NETDEVICES [=y]../drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
48 | (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
| ^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 '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);
| ^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
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);
| ^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
| ^../drivers/net/phy/mdio-octeon.c:77:2: note: in expansion of macro 'oct_mdio_writeq'
77 | oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
| ^~~~~~~~~~~~~~~../drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_remove':../drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
| ^../drivers/net/phy/mdio-octeon.c:91:2: note: in expansion of macro 'oct_mdio_writeq'
91 | oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
| ^~~~~~~~~~~~~~~cc1: some warnings being treated as errors
make[3]: *** [../scripts/Makefile.build:274: drivers/net/phy/mdio-octeon.o] Error 1 make[3]: *** Waiting for unfinished jobs....
make[2]: *** [../Makefile:1780: drivers/net/phy/] Error 2
make[1]: *** [/home/nathan/cbl/linux-next/Makefile:330: __build_one_by_one] Error 2
make: *** [Makefile:179: sub-make] Error 2
This is the diff that I came up with to solve the errors plus the casting warnings but it doesn't feel proper to me. If you all feel otherwise, I can draft up a formal commit message.
drivers/net/phy/Kconfig +1 -1
@@ -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
drivers/net/phy/mdio-cavium.h +4 -2
@@ -108,8 +108,10 @@ static inline u64 oct_mdio_readq(u64 addr) return cvmx_read_csr(addr); }#else -#define oct_mdio_writeq (val, addr) writeq(val, (void *)addr) -#define oct_mdio_readq (addr) readq((void *)addr) +#include <linux/io-64-nonatomic-lo-hi.h> + +#define oct_mdio_writeq (val, addr) writeq(val, (void *)(uintptr_t)addr) +#define oct_mdio_readq (addr) readq((void *)(uintptr_t)addr)#endif int cavium_mdiobus_read (struct mii_bus *bus,int phy_id,int regnum);
drivers/net/phy/mdio-octeon.c +1 -1
@@ -45,7 +45,7 @@ static int octeon_mdiobus_probe(struct platform_device *pdev) } bus->register_base = - (u64 )devm_ioremap (&pdev->dev, mdio_phys, regsize); + (u64 )(uintptr_t )devm_ioremap (&pdev->dev, mdio_phys, regsize);if (!bus->register_base) {dev_err (&pdev->dev,"dev_ioremap failed\n" );return -ENOMEM ;
David Miller
maintainerFrom: Nathan Chancellor <[email protected]>
Date: Wed, 31 Jul 2019 09:35:09 -0700
Quoted 3 lines
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 'writeb'? [-Werror=implicit-function-declaration]
111 | #defineoct_mdio_writeq(val, addr)writeq(val, (void *)addr)
One of the hi-lo, lo-hi writeq/readq headers has to be included.
PATCH 1/1 net: mdio-octeon: Fix build error and Kconfig warning
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.
--- drivers/net/phy/Kconfig | 2 +- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/Kconfig +1 -1
@@ -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
drivers/net/phy/mdio-cavium.h +2 -0
@@ -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
Signature · 1 line
2.22.0
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 30 lines · Nathan Chancellor
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 | #defineoct_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_OCTEONto be built withCOMPILE_TESTas 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 commit171a9bae68c7("staging/octeon:
Allow test build on !MIPS") in these files.
Quoted 5 lines
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.
Quoted 32 lines
--- drivers/net/phy/Kconfig | 2 +- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)drivers/net/phy/Kconfig +1
-1@@ -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 helpdrivers/net/phy/mdio-cavium.h +2
-0@@ -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
Signature · 1 line
~Randy
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 52 lines · Randy Dunlap
Quoted 30 lines · Nathan Chancellor
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 | #defineoct_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_OCTEONto be built withCOMPILE_TESTas 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 commit171a9bae68c7("staging/octeon:
Allow test build on !MIPS") in these files.Quoted 5 lines
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
Kconfigwarning 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!
Quoted 5 lines
kernel .config file is attached.
Am I missing another patch?
thanks.
If I add this to drivers/staging/octeon/Kconfig:
select MDIO_OCTEON
+ select MDIO_CAVIUM
help
then the build succeeds.
This isn't being done by make *config because MDIO_OCTEON depends on OF_MDIO, which is not set in my .config file, so the "select MDIO_CAVIUM" in MDIO_OCTEON is not done.
However, there are lots of type/cast warnings in both mdio-octeon and mdio-cavium:
../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’:../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
^
In file included from ../drivers/net/phy/mdio-octeon.c:14:0:../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#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’
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-octeon.c:77:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_remove’:../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-octeon.c:91:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN); ^~~~~~~~~~~~~~~
and
CC [M] drivers/net/phy/mdio-cavium.o
In file included from ../drivers/net/phy/mdio-cavium.c:11:0:../drivers/net/phy/mdio-cavium.c: In function ‘cavium_mdiobus_set_mode’:../drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_readq(addr) readq((void *)addr)
^
../drivers/net/phy/mdio-cavium.c:21:16: note: in expansion of macro ‘oct_mdio_readq’
smi_clk.u64 = oct_mdio_readq(p->register_base + SMI_CLK);
^~~~~~~~~~~~~~
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:24:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_clk.u64, p->register_base + SMI_CLK);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.c: In function ‘cavium_mdiobus_c45_addr’:../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:39:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:47:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_readq(addr) readq((void *)addr)
^
../drivers/net/phy/mdio-cavium.c:54:16: note: in expansion of macro ‘oct_mdio_readq’
smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
^~~~~~~~~~~~~~
../drivers/net/phy/mdio-cavium.c: In function ‘cavium_mdiobus_read’:
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:86:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_readq(addr) readq((void *)addr)
^
../drivers/net/phy/mdio-cavium.c:93:16: note: in expansion of macro ‘oct_mdio_readq’
smi_rd.u64 = oct_mdio_readq(p->register_base + SMI_RD_DAT);
^~~~~~~~~~~~~~
../drivers/net/phy/mdio-cavium.c: In function ‘cavium_mdiobus_write’:
../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:125:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^../drivers/net/phy/mdio-cavium.c:131:2: note: in expansion of macro ‘oct_mdio_writeq’
oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
^~~~~~~~~~~~~~~../drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_readq(addr) readq((void *)addr)
^
../drivers/net/phy/mdio-cavium.c:138:16: note: in expansion of macro ‘oct_mdio_readq’
smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
^~~~~~~~~~~~~~Quoted 34 lines
Quoted 32 lines
--- drivers/net/phy/Kconfig | 2 +- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)drivers/net/phy/Kconfig +1
-1@@ -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 helpdrivers/net/phy/mdio-cavium.h +2
-0@@ -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
Signature · 1 line
~Randy
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 6 lines · Randy Dunlap
However, there are lots of type/cast warnings in both mdio-octeon and mdio-cavium:
../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’:../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast](u64)devm_ioremap(&pdev->dev, mdio_phys, regsize); ^
cavium_mdiobus.register_base should be "void __iomem *" instead of "u64", and the cast should be dropped.
Quoted 4 lines
In file included from
../drivers/net/phy/mdio-octeon.c:14:0:../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) ^
... which allows to drop this cast as well.
Casts are evil, and usually a sign that you're doing something wrong.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
David Miller
maintainerRe: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
In reply to Nathan ChancellorFrom: Nathan Chancellor <[email protected]>
Date: Wed, 31 Jul 2019 11:50:24 -0700
Quoted 9 lines
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])
Quoted 6 lines
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'?
The proper way to fix this is to include either
linux/io-64-nonatomic-hi-lo.h
or
linux/io-64-nonatomic-lo-hi.h
whichever is appropriate.
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 21 lines · David Miller
From: Nathan Chancellor <[email protected]>
Date: Wed, 31 Jul 2019 11:50:24 -0700Quoted 9 lines
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])Quoted 6 lines
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'?The proper way to fix this is to include either
Quoted 7 lines
linux/io-64-nonatomic-hi-lo.hor
linux/io-64-nonatomic-lo-hi.hwhichever is appropriate.
Hmmmm, is that not what I did?
Although I did not know about io-64-nonatomic-hi-lo.h. What is the difference and which one is needed here?
There is apparently another failure when OF_MDIO is not set, I guess I can try to look into that as well and respin into a series if necessary.
Cheers,
Nathan
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 7 lines · Nathan Chancellor
Quoted 6 lines · David Miller
The proper way to fix this is to include either
linux/io-64-nonatomic-hi-lo.hor
Quoted 8 lines
Quoted 3 lines
linux/io-64-nonatomic-lo-hi.hwhichever is appropriate.
Hmmmm, is that not what I did?
Although I did not know about
io-64-nonatomic-hi-lo.h. What is the difference and which one is needed here?
Whether you write the high or low 32 bits first. For this, it doesn't matter, since the compiled driver will never be run on real hardware.
Quoted 3 lines
There is apparently another failure when
OF_MDIOis not set, I guess I can try to look into that as well and respin into a series if necessary.
Thanks for taking care of that!
Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Quoted 12 lines · Matthew Wilcox
Quoted 11 lines · Nathan Chancellor
Quoted 9 lines · David Miller
The proper way to fix this is to include either
linux/io-64-nonatomic-hi-lo.hor
linux/io-64-nonatomic-lo-hi.hwhichever is appropriate.
Quoted 7 lines
Quoted 4 lines
Hmmmm, is that not what I did?
Although I did not know about
io-64-nonatomic-hi-lo.h. What is the difference and which one is needed here?Whether you write the high or low 32 bits first. For this, it doesn't matter, since the compiled driver will never be run on real hardware.
That's what I figured. I have only seen lo-hi used personally, which is what I went with here. Thanks for the confirmation!
Quoted 6 lines
Quoted 4 lines
There is apparently another failure when
OF_MDIOis not set, I guess I can try to look into that as well and respin into a series if necessary.Thanks for taking care of that!
PATCH v2 1/1 net: mdio-octeon: Fix Kconfig warnings and build errors
In reply to Nathan ChancellorAfter 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.").
---
v1 -> v2:
* Address Randy's reported failure here: https://lore.kernel.org/netdev/[email protected]/
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(-)
drivers/net/phy/Kconfig +2 -2
@@ -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
drivers/net/phy/mdio-cavium.h +2 -0
@@ -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
Signature · 1 line
2.23.0.rc1
Re: [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors
Quoted 28 lines · Nathan Chancellor
After commit
171a9bae68c7("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a fewKconfigwarnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds):
CONFIG_NETDEVICES=y
CONFIG_STAGING=y
CONFIG_COMPILE_TEST=yand
CONFIG_OCTEON_ETHERNETas 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 | #defineoct_mdio_writeq(val, addr)writeq(val, (void *)addr)
| ^~~~~~
CONFIG_64BITis not strictly necessary if the proper readq/writeq definitions are included fromio-64-nonatomic-lo-hi.h.
Quoted 8 lines
CONFIG_OF_MDIOis not needed whenCONFIG_COMPILE_TESTis enabled because of commitf9dc9ac51610("of/mdio: Add dummy functions inof_mdio.h.").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]>
Works for me. Fixes the reported build errors. Thanks.
Quoted 42 lines
---
v1 -> v2:
* Address Randy's reported failure here: https://lore.kernel.org/netdev/[email protected]/
by not requiringCONFIG_OF_MDIOwhenCONFIG_COMPILE_TESTis set.* Improve commit message
drivers/net/phy/Kconfig | 4 ++-- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)drivers/net/phy/Kconfig +2
-2@@ -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 MDIOdrivers/net/phy/mdio-cavium.h +2
-0@@ -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
Signature · 1 line
~Randy
Re: [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors
In reply to Nathan ChancellorFrom: Nathan Chancellor <[email protected]>
Date: Fri, 2 Aug 2019 23:01:56 -0700
Quoted 28 lines
After commit
171a9bae68c7("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a fewKconfigwarnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds):
CONFIG_NETDEVICES=y
CONFIG_STAGING=y
CONFIG_COMPILE_TEST=yand
CONFIG_OCTEON_ETHERNETas 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 | #defineoct_mdio_writeq(val, addr)writeq(val, (void *)addr)
| ^~~~~~
CONFIG_64BITis not strictly necessary if the proper readq/writeq definitions are included fromio-64-nonatomic-lo-hi.h.
Quoted 8 lines
CONFIG_OF_MDIOis not needed whenCONFIG_COMPILE_TESTis enabled because of commitf9dc9ac51610("of/mdio: Add dummy functions inof_mdio.h.").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]>
Applied to net-next.
Please make it clear what tree your changes are targetting in the future, thank you.
Re: [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors
Quoted 40 lines · David Miller
From: Nathan Chancellor <[email protected]>
Date: Fri, 2 Aug 2019 23:01:56 -0700Quoted 28 lines
After commit
171a9bae68c7("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a fewKconfigwarnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds):
CONFIG_NETDEVICES=y
CONFIG_STAGING=y
CONFIG_COMPILE_TEST=yand
CONFIG_OCTEON_ETHERNETas 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 | #defineoct_mdio_writeq(val, addr)writeq(val, (void *)addr)
| ^~~~~~
CONFIG_64BITis not strictly necessary if the proper readq/writeq definitions are included fromio-64-nonatomic-lo-hi.h.Quoted 8 lines
CONFIG_OF_MDIOis not needed whenCONFIG_COMPILE_TESTis enabled because of commitf9dc9ac51610("of/mdio: Add dummy functions inof_mdio.h.").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]>
Quoted 4 lines
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