net: ethernet: Allow Marvell & Freescale to COMPILE_TEST
v3 cover net: ethernet: Allow Marvell & Freescale to COMPILE_TEST
Hi David,
This patch series allows most of the Freescale Ethernet drivers to be built with COMPILE_TEST and all Marvell drivers to build with COMPILE_TEST.
This is helpful to increase build coverage without requiring hacking into Kconfig anymore.
Changes in v3:
- reorder patches to avoid introducing a build warning between commits
Changes in v2:
- rename register define clash when building for i386 (spotted by LKP)
Florian Fainelli (3):
net: gianfar_ptp: Rename FS bit to FIPERST
net: fsl: Allow most drivers to be built with COMPILE_TEST
net: marvell: Allow drivers to be built with COMPILE_TEST
drivers/net/ethernet/freescale/Kconfig | 3 ++- drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++-- drivers/net/ethernet/marvell/Kconfig | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.3
PATCH v2 1/3 net: fsl: Allow most drivers to be built with COMPILE_TEST
There are only a handful of Freescale Ethernet drivers that don't actually build with COMPILE_TEST:
* FEC, for which we would need to define a default register layout if no supported architecture is defined
* UCC_GETH which depends on PowerPC cpm.h header (which could be moved to a generic location)
We need to fix an unmet dependency to get there though:
warning: (FSL_XGMAC_MDIO) selects OF_MDIO which has unmet direct dependencies (OF && PHYLIB)
which would result in CONFIG_OF_MDIO=[ym] without CONFIG_OF to be set.
--- drivers/net/ethernet/freescale/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/Kconfig +2 -1
@@ -8,7 +8,7 @@ config NET_VENDOR_FREESCALE depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \ M523x || M527x || M5272 || M528x || M520x || M532x || \ ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \ - ARCH_LAYERSCAPE + ARCH_LAYERSCAPE || COMPILE_TEST ---help--- If you have a network (Ethernet) card belonging to this class, say Y.
@@ -65,6 +65,7 @@ config FSL_PQ_MDIO config FSL_XGMAC_MDIO tristate "Freescale XGMAC MDIO" select PHYLIB + depends on OF select OF_MDIO ---help--- This driver supports the MDIO bus on the Fman 10G Ethernet MACs, and
Signature · 1 line
2.9.3
PATCH v3 1/3 net: gianfar_ptp: Rename FS bit to FIPERST
In reply to Florian FainelliFS is a global symbol used by the x86 32-bit architecture, fixes builds re-definitions:
Quoted 2 lines
Quoted 2 lines
drivers/net/ethernet/freescale/gianfar_ptp.c:75:0: warning: "FS" redefined
#define FS (1<<28) /* FIPER start indication */
In file included from arch/x86/include/uapi/asm/ptrace.h:5:0,
from arch/x86/include/asm/ptrace.h:6,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from
drivers/net/ethernet/freescale/gianfar_ptp.c:23:
arch/x86/include/uapi/asm/ptrace-abi.h:15:0: note: this is the
location of the previous definition
#define FS 9--- drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/freescale/gianfar_ptp.c +2 -2
@@ -72,7 +72,7 @@ struct gianfar_ptp_registers {/* Bit definitions for the TMR_CTRL register */ #define ALM1P (1<<31)/* Alarm1 output polarity */ #define ALM2P (1<<30)/* Alarm2 output polarity */ -#define FS (1<<28)/* FIPER start indication */ +#define FIPERST (1<<28)/* FIPER start indication */ #define PP1L (1<<27)/* Fiper1 pulse loopback mode enabled. */ #define PP2L (1<<26)/* Fiper2 pulse loopback mode enabled. */ #define TCLK_PERIOD_SHIFT (16)/* 1588 timer reference clock period. */
@@ -502,7 +502,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)gfar_write (&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);gfar_write (&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);set_alarm (etsects); -gfar_write (&etsects->regs->tmr_ctrl, tmr_ctrl|FS |RTPE |TE |FRD ); +gfar_write (&etsects->regs->tmr_ctrl, tmr_ctrl|FIPERST |RTPE |TE |FRD );spin_unlock_irqrestore (&etsects->lock, flags);
Signature · 1 line
2.9.3
PATCH v3 2/3 net: fsl: Allow most drivers to be built with COMPILE_TEST
In reply to Florian FainelliThere are only a handful of Freescale Ethernet drivers that don't actually build with COMPILE_TEST:
* FEC, for which we would need to define a default register layout if no supported architecture is defined
* UCC_GETH which depends on PowerPC cpm.h header (which could be moved to a generic location)
We need to fix an unmet dependency to get there though:
warning: (FSL_XGMAC_MDIO) selects OF_MDIO which has unmet direct dependencies (OF && PHYLIB)
which would result in CONFIG_OF_MDIO=[ym] without CONFIG_OF to be set.
--- drivers/net/ethernet/freescale/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/Kconfig +2 -1
@@ -8,7 +8,7 @@ config NET_VENDOR_FREESCALE depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \ M523x || M527x || M5272 || M528x || M520x || M532x || \ ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \ - ARCH_LAYERSCAPE + ARCH_LAYERSCAPE || COMPILE_TEST ---help--- If you have a network (Ethernet) card belonging to this class, say Y.
@@ -65,6 +65,7 @@ config FSL_PQ_MDIO config FSL_XGMAC_MDIO tristate "Freescale XGMAC MDIO" select PHYLIB + depends on OF select OF_MDIO ---help--- This driver supports the MDIO bus on the Fman 10G Ethernet MACs, and
Signature · 1 line
2.9.3
kbuild test robot
build botRe: [PATCH net-next v3 2/3] net: fsl: Allow most drivers to be built with COMPILE_TEST
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805 config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gnu-gcc…
Hi Florian,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
All warnings (new ones prefixed by >>):
drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_remove':
>> drivers/net/ethernet/freescale/fsl_pq_mdio.c:498:27: warning: unused variable 'priv' [-Wunused-variable]
struct fsl_pq_mdio_priv *priv = bus->priv;
^~~~vim +/priv +498 drivers/net/ethernet/freescale/fsl_pq_mdio.c
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 482 return 0;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 483
dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 484 error:
dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 485 if (priv->map)
b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 486 iounmap(priv->map);
dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 487
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 488 kfree(new_bus);
dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 489
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 490 return err;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 491 }
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 492
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 493
5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 494 static int fsl_pq_mdio_remove(struct platform_device *pdev)
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 495 {
5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 496 struct device *device = &pdev->dev;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 497 struct mii_bus *bus = dev_get_drvdata(device);
b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 @498 struct fsl_pq_mdio_priv *priv = bus->priv;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 499
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 500 mdiobus_unregister(bus);
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 501
b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 502 iounmap(priv->map);
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 503 mdiobus_free(bus);
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 504
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 505 return 0;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 506 }:::::: The code at line 498 was first introduced by commit
:::::: b3319b10523d8dac82b134a05de2a403119abebd fsl_pq_mdio: Fix iomem unmapping for non-eTSEC2.0 controllers
:::::: TO: Anton Vorontsov <[email protected]> :::::: CC: David S. Miller <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH net-next v3 2/3] net: fsl: Allow most drivers to be built with COMPILE_TEST
Quoted 13 lines · kbuild test robot
Hi Florian,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
Quoted 5 lines
All warnings (new ones prefixed by >>):
drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_remove':Quoted 1 line
Quoted 1 line
drivers/net/ethernet/freescale/fsl_pq_mdio.c:498:27: warning: unused variable 'priv' [-Wunused-variable]struct fsl_pq_mdio_priv *priv = bus->priv;
Humm, this looks bogus, the variable is used see below:
Quoted 17 lines
^~~~vim +/priv +498
drivers/net/ethernet/freescale/fsl_pq_mdio.c1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 482 return 0; 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 483 dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 484 error: dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 485 if (priv->map) b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 486 iounmap(priv->map); dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 487 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 488 kfree(new_bus); dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 489 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 490 return err; 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 491 } 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 492 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 493 5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 494 static int fsl_pq_mdio_remove(struct platform_device *pdev)
Quoted 8 lines
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 495 {
5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 496 struct device *device = &pdev->dev;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 497 struct mii_bus *bus = dev_get_drvdata(device);
b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 @498 struct fsl_pq_mdio_priv *priv = bus->priv;
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 499
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 500 mdiobus_unregister(bus);
1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 501
b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 502 iounmap(priv->map);Right here.
What compiler version is this?
Signature · 1 line
Florian
Fengguang Wu
build botRe: [PATCH net-next v3 2/3] net: fsl: Allow most drivers to be built with COMPILE_TEST
Compiler is sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705.
On Wed, Nov 16, 2016 at 11:52:45AM -0800, Florian Fainelli wrote:
>On 11/15/2016 07:23 PM, kbuild test robot wrote: >> Hi Florian, >> >> [auto build test WARNING on net-next/master] >> >> url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805 >> config: sh-allmodconfig (attached as .config) >> compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 >> reproduce: >> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # save the attached .config to linux build tree >> make.cross ARCH=sh >> >> All warnings (new ones prefixed by >>): >> >> drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_remove': >>>> drivers/net/ethernet/freescale/fsl_pq_mdio.c:498:27: warning: unused variable 'priv' [-Wunused-variable] >> struct fsl_pq_mdio_priv *priv = bus->priv; > >Humm, this looks bogus, the variable is used see below: > >> ^~~~ >> >> vim +/priv +498 drivers/net/ethernet/freescale/fsl_pq_mdio.c >> >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 482 return 0; >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 483 >> dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 484 error: >> dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 485 if (priv->map) >> b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 486 iounmap(priv->map); >> dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 487 >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 488 kfree(new_bus); >> dd3b8a32 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 489 >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 490 return err; >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 491 } >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 492 >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 493 >> 5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 494 static int fsl_pq_mdio_remove(struct platform_device *pdev) >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 495 { >> 5078ac79 drivers/net/ethernet/freescale/fsl_pq_mdio.c Timur Tabi 2012-08-29 496 struct device *device = &pdev->dev; >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 497 struct mii_bus *bus = dev_get_drvdata(device); >> b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 @498 struct fsl_pq_mdio_priv *priv = bus->priv; >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 499 >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 500 mdiobus_unregister(bus); >> 1577ecef drivers/net/fsl_pq_mdio.c Andy Fleming 2009-02-04 501 >> b3319b10 drivers/net/fsl_pq_mdio.c Anton Vorontsov 2009-12-30 502 iounmap(priv->map); > >Right here. > >What compiler version is this?
Compiler is sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705.
include/asm-generic/io.h conditionally defines iounmap() to be an empty inline function, which may explain the warning on sh4.
General speaking, it's a false warning. The solution could be to teach the robot to ignore such 'unused variable' warnings in non-x86 archs.
Thanks,
Fengguang
Re: [PATCH net-next v3 2/3] net: fsl: Allow most drivers to be built with COMPILE_TEST
Quoted 5 lines · CET Fengguang Wu
Quoted 4 lines
Right here.
What compiler version is this?
Quoted 7 lines
Compiler is sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705.
include/asm-generic/io.hconditionally definesiounmap()to be an empty inline function, which may explain the warning on sh4.General speaking, it's a false warning. The solution could be to teach the robot to ignore such 'unused variable' warnings in non-x86 archs.
I think we should change the iounmap stub macro into an inline function. Does this only happen on sh or other architectures too?
I certainly wouldn't want the warning to be ignored on ARM, or in general on all architectures other than x86.
Arnd
David Miller
maintainerRe: [PATCH net-next v3 2/3] net: fsl: Allow most drivers to be built with COMPILE_TEST
From: Arnd Bergmann <[email protected]>
Date: Thu, 17 Nov 2016 11:47:02 +0100
Quoted 8 lines · CET Fengguang Wu
Quoted 5 lines
include/asm-generic/io.hconditionally definesiounmap()to be an empty inline function, which may explain the warning on sh4.General speaking, it's a false warning. The solution could be to teach the robot to ignore such 'unused variable' warnings in non-x86 archs.
I think we should change the iounmap stub macro into an inline function.
Agreed.
PATCH v3 3/3 net: marvell: Allow drivers to be built with COMPILE_TEST
In reply to Florian FainelliAll Marvell Ethernet drivers actually build fine with COMPILE_TEST with a few warnings.
--- drivers/net/ethernet/marvell/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/marvell/Kconfig +4 -4
@@ -5,7 +5,7 @@ config NET_VENDOR_MARVELL bool "Marvell devices" default y - depends on PCI || CPU_PXA168 || MV64X60 || PPC32 || PLAT_ORION || INET + depends on PCI || CPU_PXA168 || MV64X60 || PPC32 || PLAT_ORION || INET || COMPILE_TEST ---help--- If you have a network (Ethernet) card belonging to this class, say Y.
@@ -18,7 +18,7 @@ if NET_VENDOR_MARVELL config MV643XX_ETH tristate "Marvell Discovery (643XX) and Orion ethernet support" - depends on (MV64X60 || PPC32 || PLAT_ORION) && INET + depends on (MV64X60 || PPC32 || PLAT_ORION || COMPILE_TEST) && INET select PHYLIB select MVMDIO ---help---
@@ -55,7 +55,7 @@ config MVNETA_BM_ENABLE config MVNETA tristate "Marvell Armada 370/38x/XP network interface support" - depends on PLAT_ORION + depends on PLAT_ORION || COMPILE_TEST select MVMDIO select FIXED_PHY ---help---
@@ -77,7 +77,7 @@ config MVNETA_BM config MVPP2 tristate "Marvell Armada 375 network interface support" - depends on MACH_ARMADA_375 + depends on MACH_ARMADA_375 || COMPILE_TEST select MVMDIO ---help--- This driver supports the network interface units in the
Signature · 1 line
2.9.3
kbuild test robot
build botRe: [PATCH net-next v3 3/3] net: marvell: Allow drivers to be built with COMPILE_TEST
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805 config: s390-allyesconfig (attached as .config) compiler: s390x-linux-gnu-gcc…
Hi Florian,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805
config: s390-allyesconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390
All warnings (new ones prefixed by >>):
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_mac_promisc_set':
drivers/net/ethernet/marvell/mvpp2.c:524:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L2_UCAST ~(BIT(9) | BIT(10))
^
drivers/net/ethernet/marvell/mvpp2.c:1459:33: note: in expansion of macro 'MVPP2_PRS_RI_L2_UCAST'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L2_UCAST,
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_dsa_tag_set':
drivers/net/ethernet/marvell/mvpp2.c:517:34: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_VLAN_NONE ~(BIT(2) | BIT(3))
^
drivers/net/ethernet/marvell/mvpp2.c:1572:34: note: in expansion of macro 'MVPP2_PRS_RI_VLAN_NONE'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_VLAN_NONE,
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_dsa_tag_ethertype_set':
drivers/net/ethernet/marvell/mvpp2.c:517:34: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_VLAN_NONE ~(BIT(2) | BIT(3))
^
drivers/net/ethernet/marvell/mvpp2.c:1642:34: note: in expansion of macro 'MVPP2_PRS_RI_VLAN_NONE'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_VLAN_NONE,
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_etype_init':
drivers/net/ethernet/marvell/mvpp2.c:529:30: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UN ~(BIT(12) | BIT(13) | BIT(14))
^
drivers/net/ethernet/marvell/mvpp2.c:2477:32: note: in expansion of macro 'MVPP2_PRS_RI_L3_UN'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_UN,
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c:529:30: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UN ~(BIT(12) | BIT(13) | BIT(14))
^
drivers/net/ethernet/marvell/mvpp2.c:2488:42: note: in expansion of macro 'MVPP2_PRS_RI_L3_UN'
mvpp2_prs_shadow_ri_set(priv, pe.index, MVPP2_PRS_RI_L3_UN,
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
drivers/net/ethernet/marvell/mvpp2.c:517:34: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_VLAN_NONE ~(BIT(2) | BIT(3))
^
drivers/net/ethernet/marvell/mvpp2.c:2563:32: note: in expansion of macro 'MVPP2_PRS_RI_VLAN_NONE'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_VLAN_NONE,
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_pppoe_init':
drivers/net/ethernet/marvell/mvpp2.c:529:30: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UN ~(BIT(12) | BIT(13) | BIT(14))
^
drivers/net/ethernet/marvell/mvpp2.c:2669:32: note: in expansion of macro 'MVPP2_PRS_RI_L3_UN'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_UN,
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_ip4_init':
drivers/net/ethernet/marvell/mvpp2.c:537:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UCAST ~(BIT(15) | BIT(16))
^
drivers/net/ethernet/marvell/mvpp2.c:2755:32: note: in expansion of macro 'MVPP2_PRS_RI_L3_UCAST'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_UCAST,
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_ip6_init':
drivers/net/ethernet/marvell/mvpp2.c:529:30: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UN ~(BIT(12) | BIT(13) | BIT(14))
^
drivers/net/ethernet/marvell/mvpp2.c:2823:32: note: in expansion of macro 'MVPP2_PRS_RI_L3_UN'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_UN |
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c:537:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L3_UCAST ~(BIT(15) | BIT(16))
^
drivers/net/ethernet/marvell/mvpp2.c:2887:32: note: in expansion of macro 'MVPP2_PRS_RI_L3_UCAST'
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_UCAST,
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_mac_da_accept':
drivers/net/ethernet/marvell/mvpp2.c:524:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define MVPP2_PRS_RI_L2_UCAST ~(BIT(9) | BIT(10))
^
drivers/net/ethernet/marvell/mvpp2.c:3100:8: note: in expansion of macro 'MVPP2_PRS_RI_L2_UCAST'
ri = MVPP2_PRS_RI_L2_UCAST | MVPP2_PRS_RI_MAC_ME_MASK;
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/marvell/mvpp2.c:13:0:
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_bm_pool_create':
drivers/net/ethernet/marvell/mvpp2.c:3375:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (!IS_ALIGNED((u32)bm_pool->virt_addr, MVPP2_BM_POOL_PTR_ALIGN)) {
^
include/linux/kernel.h:51:30: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/net/ethernet/marvell/mvpp2.c:3375:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (!IS_ALIGNED((u32)bm_pool->virt_addr, MVPP2_BM_POOL_PTR_ALIGN)) {
^
include/linux/kernel.h:51:44: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_bm_bufs_free':
drivers/net/ethernet/marvell/mvpp2.c:3433:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
dev_kfree_skb_any((struct sk_buff *)vaddr);
^
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_bm_bufs_add':
drivers/net/ethernet/marvell/mvpp2.c:3647:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mvpp2_pool_refill(port, bm, (u32)phys_addr, (u32)skb);
^
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_swf_bm_pool_init':
>> drivers/net/ethernet/marvell/mvpp2.c:384:2: warning: overflow in implicit constant conversion [-Woverflow]
((total_size) - NET_SKB_PAD - MVPP2_SKB_SHINFO_SIZE)
^
>> drivers/net/ethernet/marvell/mvpp2.c:619:34: note: in expansion of macro 'MVPP2_RX_MAX_PKT_SIZE'
#define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(512)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/marvell/mvpp2.c:3743:8: note: in expansion of macro 'MVPP2_BM_SHORT_PKT_SIZE'
MVPP2_BM_SHORT_PKT_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_rx_refill':
drivers/net/ethernet/marvell/mvpp2.c:5011:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mvpp2_pool_refill(port, bm, (u32)phys_addr, (u32)skb);
^
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_buff_hdr_rx':
drivers/net/ethernet/marvell/mvpp2.c:5066:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
skb = (struct sk_buff *)buff_virt_addr;
^
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_rx':
drivers/net/ethernet/marvell/mvpp2.c:5136:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
skb = (struct sk_buff *)rx_desc->buf_cookie;
^vim +384 drivers/net/ethernet/marvell/mvpp2.c
3f518509 Marcin Wojtas 2014-07-10 368 /* RX FIFO constants */ 3f518509 Marcin Wojtas 2014-07-10 369 #define MVPP2_RX_FIFO_PORT_DATA_SIZE 0x2000 3f518509 Marcin Wojtas 2014-07-10 370 #define MVPP2_RX_FIFO_PORT_ATTR_SIZE 0x80 3f518509 Marcin Wojtas 2014-07-10 371 #define MVPP2_RX_FIFO_PORT_MIN_PKT 0x80 3f518509 Marcin Wojtas 2014-07-10 372 3f518509 Marcin Wojtas 2014-07-10 373 /* RX buffer constants */ 3f518509 Marcin Wojtas 2014-07-10 374 #define MVPP2_SKB_SHINFO_SIZE \ 3f518509 Marcin Wojtas 2014-07-10 375 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) 3f518509 Marcin Wojtas 2014-07-10 376 3f518509 Marcin Wojtas 2014-07-10 377 #define MVPP2_RX_PKT_SIZE(mtu) \ 3f518509 Marcin Wojtas 2014-07-10 378 ALIGN((mtu) + MVPP2_MH_SIZE + MVPP2_VLAN_TAG_LEN + \ 4a0a12d2 Jisheng Zhang 2016-04-01 379 ETH_HLEN + ETH_FCS_LEN, cache_line_size()) 3f518509 Marcin Wojtas 2014-07-10 380 3f518509 Marcin Wojtas 2014-07-10 381 #define MVPP2_RX_BUF_SIZE(pkt_size) ((pkt_size) + NET_SKB_PAD) 3f518509 Marcin Wojtas 2014-07-10 382 #define MVPP2_RX_TOTAL_SIZE(buf_size) ((buf_size) + MVPP2_SKB_SHINFO_SIZE) 3f518509 Marcin Wojtas 2014-07-10 383 #define MVPP2_RX_MAX_PKT_SIZE(total_size) \ 3f518509 Marcin Wojtas 2014-07-10 @384 ((total_size) - NET_SKB_PAD - MVPP2_SKB_SHINFO_SIZE) 3f518509 Marcin Wojtas 2014-07-10 385 3f518509 Marcin Wojtas 2014-07-10 386 #define MVPP2_BIT_TO_BYTE(bit) ((bit) / 8) 3f518509 Marcin Wojtas 2014-07-10 387 3f518509 Marcin Wojtas 2014-07-10 388 /* IPv6 max L3 address size */ 3f518509 Marcin Wojtas 2014-07-10 389 #define MVPP2_MAX_L3_ADDR_SIZE 16 3f518509 Marcin Wojtas 2014-07-10 390 3f518509 Marcin Wojtas 2014-07-10 391 /* Port flags */ 3f518509 Marcin Wojtas 2014-07-10 392 #define MVPP2_F_LOOPBACK BIT(0)
:::::: The code at line 384 was first introduced by commit
:::::: 3f518509dedc99f0b755d2ce68d24f610e3a005a ethernet: Add new driver for Marvell Armada 375 network unit
:::::: TO: Marcin Wojtas <[email protected]>
:::::: CC: David S. Miller <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH net-next v3 3/3] net: marvell: Allow drivers to be built with COMPILE_TEST
Quoted 13 lines · kbuild test robot
Hi Florian,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-gianfar_ptp-Rename-FS-bit-to-FIPERST/20161116-095805
config: s390-allyesconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390
Quoted 1 line
All warnings (new ones prefixed by >>):
While we could fix some of these warnings for 64-bit architectures, the mvneta and mvpp2 drivers would not work there anyway since they assume physical addresses will always be 32-bit wide and casts such addresses accordingly.
Should we still silence these warnings?
Signature · 1 line
Florian
PATCH v2 2/3 net: gianfar_ptp: Rename FS bit to FIPERST
In reply to Florian FainelliFS is a global symbol used by the x86 32-bit architecture, fixes builds re-definitions:
Quoted 2 lines
Quoted 2 lines
drivers/net/ethernet/freescale/gianfar_ptp.c:75:0: warning: "FS" redefined
#define FS (1<<28) /* FIPER start indication */
In file included from arch/x86/include/uapi/asm/ptrace.h:5:0,
from arch/x86/include/asm/ptrace.h:6,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from
drivers/net/ethernet/freescale/gianfar_ptp.c:23:
arch/x86/include/uapi/asm/ptrace-abi.h:15:0: note: this is the
location of the previous definition
#define FS 9--- drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/freescale/gianfar_ptp.c +2 -2
@@ -72,7 +72,7 @@ struct gianfar_ptp_registers {/* Bit definitions for the TMR_CTRL register */ #define ALM1P (1<<31)/* Alarm1 output polarity */ #define ALM2P (1<<30)/* Alarm2 output polarity */ -#define FS (1<<28)/* FIPER start indication */ +#define FIPERST (1<<28)/* FIPER start indication */ #define PP1L (1<<27)/* Fiper1 pulse loopback mode enabled. */ #define PP2L (1<<26)/* Fiper2 pulse loopback mode enabled. */ #define TCLK_PERIOD_SHIFT (16)/* 1588 timer reference clock period. */
@@ -502,7 +502,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)gfar_write (&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);gfar_write (&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);set_alarm (etsects); -gfar_write (&etsects->regs->tmr_ctrl, tmr_ctrl|FS |RTPE |TE |FRD ); +gfar_write (&etsects->regs->tmr_ctrl, tmr_ctrl|FIPERST |RTPE |TE |FRD );spin_unlock_irqrestore (&etsects->lock, flags);
Signature · 1 line
2.9.3
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Tue, 15 Nov 2016 16:40:32 -0800
Quoted 3 lines
This patch series allows most of the Freescale Ethernet drivers to be built with
COMPILE_TESTand all Marvell drivers to build withCOMPILE_TEST.
Looks like the kbuild robot found some problems with this.
Quoted 9 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Tue, 15 Nov 2016 16:40:32 -0800Quoted 3 lines
This patch series allows most of the Freescale Ethernet drivers to be built with
COMPILE_TESTand all Marvell drivers to build withCOMPILE_TEST.Looks like the kbuild robot found some problems with this.
Indeed, let me try to address these and then resubmit. Thanks!
Signature · 1 line
Florian