net: dsa: remove unnecessary phy.h include
Subsystems (18)
RFC PATCH 1/1 net: dsa: remove unnecessary phy.h include
Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h and phy_fixed.h from net/dsa.h.
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
---
I noticed when I touched linux/phy.h that a lot of the kernel ended up being unexpectedly rebuilt, as linux/netdevice.h includes net/dsa.h, which then then includes linux/phy.h. I've tested this change on both ARM and ARM64, but I'd suggest letting the 0-day builder have a bite at this, and then only taking it if everyone is confident that there's a slim chance of any problems. Also, it may need some rework to apply to davem's tree. All of the above makes this RFC only.
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + include/net/dsa.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +1 -0
@@ -15,6 +15,7 @@#include <linux/if_vlan.h> #include <linux/irq.h> #include <linux/gpio/consumer.h> +#include <linux/phy.h> #ifndef UINT64_MAX #define UINT64_MAX (u64)(~((u64)0))
include/net/dsa.h +4 -2
@@ -11,15 +11,17 @@#ifndef __LINUX_NET_DSA_H#define __LINUX_NET_DSA_H +#include <linux/if.h> #include <linux/if_ether.h> #include <linux/list.h> #include <linux/timer.h> #include <linux/workqueue.h> #include <linux/of.h> -#include <linux/phy.h> -#include <linux/phy_fixed.h> #include <linux/ethtool.h> +struct phy_device ; +struct fixed_phy_status ; +enum dsa_tag_protocol {DSA_TAG_PROTO_NONE =0 , DSA_TAG_PROTO_DSA,
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
Hi Russell,
Quoted 6 lines · Russell King - ARM Linux
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Quoted 8 lines
Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>
This patch applies cleanly on net-next and builds correctly after touching include/linux/phy.h. My boards work fine with it.
Thanks,
Vivien
Quoted 6 lines · Russell King - ARM Linux
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Quoted 8 lines
Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>
Quoted 50 lines
---
I noticed when I touchedlinux/phy.hthat a lot of the kernel ended up being unexpectedly rebuilt, aslinux/netdevice.hincludesnet/dsa.h, which then then includeslinux/phy.h. I've tested this change on both ARM and ARM64, but I'd suggest letting the 0-day builder have a bite at this, and then only taking it if everyone is confident that there's a slim chance of any problems. Also, it may need some rework to apply to davem's tree. All of the above makes this RFC only.drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + include/net/dsa.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-)drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +1
-0@@ -15,6 +15,7 @@#include <linux/if_vlan.h> #include <linux/irq.h> #include <linux/gpio/consumer.h> +#include <linux/phy.h> #ifndef UINT64_MAX #define UINT64_MAX (u64)(~((u64)0))include/net/dsa.h +4
-2@@ -11,15 +11,17 @@#ifndef __LINUX_NET_DSA_H#define __LINUX_NET_DSA_H +#include <linux/if.h> #include <linux/if_ether.h> #include <linux/list.h> #include <linux/timer.h> #include <linux/workqueue.h> #include <linux/of.h> -#include <linux/phy.h> -#include <linux/phy_fixed.h> #include <linux/ethtool.h> +struct phy_device ; +struct fixed_phy_status ; +enum dsa_tag_protocol {DSA_TAG_PROTO_NONE =0 , DSA_TAG_PROTO_DSA,
Signature · 1 line
Florian
From: Russell King - ARM Linux <[email protected]>
Date: Wed, 18 Jan 2017 00:14:03 +0000
Quoted 6 lines
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Quoted 8 lines
Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>
Applied, thanks.
Quoted 13 lines · David Miller
From: Russell King - ARM Linux <[email protected]>
Date: Wed, 18 Jan 2017 00:14:03 +0000Quoted 10 lines
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.
Quoted 6 lines
Quoted 4 lines
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>Applied, thanks.
Hmm, now that's _really_ interesting.
I think you've said to others to send patches with RFC in them when they aren't to be applied. I sent this with RFC in, and it still got applied.
This is _really_ unfortunate, as the 0-day builder has been sending me a stream of build errors over it, and I now have a branch with 9 patches plus this one in fixing those errors...
And I did say in the comments below the --- that it should be left a few days for the 0-day builder to run through it and find those errors.
Ho hum.
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
David Miller
maintainerFrom: Russell King - ARM Linux <[email protected]>
Date: Wed, 18 Jan 2017 21:46:28 +0000
Quoted 14 lines · David Miller
Quoted 13 lines
From: Russell King - ARM Linux <[email protected]>
Date: Wed, 18 Jan 2017 00:14:03 +0000Quoted 10 lines
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>Applied, thanks.
Hmm, now that's _really_ interesting.
It got reviewed-by and seemed reasonable.
I am always allowed to use my judgment to turn an RFC into a patch I actually apply, especially when other developers review the change.
If you read your email now you'll see that I reverted it before pushing it out, because of the fallout you mention.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 18 Jan 2017 16:37:14 -0500 (EST)
Quoted 13 lines
From: Russell King - ARM Linux <[email protected]>
Date: Wed, 18 Jan 2017 00:14:03 +0000Quoted 10 lines
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.
Quoted 6 lines
Quoted 4 lines
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
Signed-off-by Russell King <[email protected]>Applied, thanks.
Acutallly, I'm reverting this, it breaks the build all over the place.
The problem is that it seems that somehow we are getting an implicit module.h include via phy.h and this propagates all over the tree. So I get failures like:
net/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or ‘...’ before string constant
MODULE_LICENSE("GPL v2");
...net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function ‘xprt_rdma_bc_put’:net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function ‘module_put’ [-Werror=implicit-function-declaration]
module_put(THIS_MODULE);
^net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function ‘xprt_setup_rdma_bc’:net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function ‘try_module_get’ [-Werror=implicit-function-declaration]
if (!try_module_get(THIS_MODULE))
Please resubmit this after you can successfully complete an allmodconfig build.
Thanks.
cover net: dsa: remove unnecessary phy.h include
In reply to Russell King - ARM LinuxIncluding phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h and phy_fixed.h from net/dsa.h.
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
In order to make this change, several drivers need to be updated to include necessary headers that they were picking up through this include. This has resulted in a much larger patch series.
I'm assuming the 0-day builder has had 24 hours with this series, and hasn't reported any further issues with it - the last issue was two weeks ago (before I became ill) which I fixed over the last weekend.
I'm hoping this doesn't conflict with what's already in net-next...
arch/mips/cavium-octeon/octeon-platform.c | 4 ---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/ethernet/broadcom/bgmac.c | 2 ++ drivers/net/ethernet/cadence/macb.h | 2 ++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 + drivers/net/ethernet/cavium/liquidio/octeon_console.c | 1 + drivers/net/ethernet/freescale/fman/fman_memac.c | 1 + drivers/net/ethernet/marvell/mvneta.c | 1 + drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + drivers/net/usb/lan78xx.c | 1 + drivers/net/wireless/ath/ath5k/ahb.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 1 + include/net/dsa.h | 6 ++++-- net/core/netprio_cgroup.c | 1 + net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 16 files changed, 20 insertions(+), 7 deletions(-)
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
PATCH 1/13 net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h
Removing linux/phy.h from net/dsa.h reveals a build error in the sunrpc code:
net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put':net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration] net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_setup_rdma_bc':net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]
Fix this by adding linux/module.h to svc_rdma_backchannel.c
--- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 1 file changed, 1 insertion(+)
net/sunrpc/xprtrdma/svc_rdma_backchannel.c +1 -0
@@ -4,6 +4,7 @@* Support for backward direction RPCs on RPC/RDMA (server-side). */ +#include <linux/module.h> #include <linux/sunrpc/svc_rdma.h> #include "xprt_rdma.h"
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdwi-0000Vs-97-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Anna Schumaker
Acked-byRe: [PATCH 4.10-rc3 01/13] net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h
Hi Russell,
Quoted 11 lines · Russell King
Removing
linux/phy.hfromnet/dsa.hreveals a build error in the sunrpc code:
net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put':net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration]net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_setup_rdma_bc':net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]Fix this by adding
linux/module.htosvc_rdma_backchannel.cSigned-off-by Russell King <[email protected]>
This patch looks okay to me:
Quoted 17 lines
--- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 1 file changed, 1 insertion(+)net/sunrpc/xprtrdma/svc_rdma_backchannel.c +1
-0@@ -4,6 +4,7 @@* Support for backward direction RPCs on RPC/RDMA (server-side). */ +#include <linux/module.h> #include <linux/sunrpc/svc_rdma.h> #include "xprt_rdma.h"
PATCH 2/13 net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxnet/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or '...' before string constant
MODULE_LICENSE("GPL v2");
^~~~~~~~Add linux/module.h to fix this.
--- net/core/netprio_cgroup.c | 1 + 1 file changed, 1 insertion(+)
net/core/netprio_cgroup.c +1 -0
@@ -13,6 +13,7 @@#include <linux/slab.h> #include <linux/types.h> +#include <linux/module.h> #include <linux/string.h> #include <linux/errno.h> #include <linux/skbuff.h>
Signature · 1 line
2.7.4
PATCH 3/13 net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/cadence/macb.h:862:33: sparse: expected ; at end of declaration drivers/net/ethernet/cadence/macb.h:862:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/ethernet/cadence/macb.h:862:33: sparse: got phy_interface drivers/net/ethernet/cadence/macb.h:877:1: sparse: Expected ; at the end of type declaration drivers/net/ethernet/cadence/macb.h:877:1: sparse: got }
In file included from drivers/net/ethernet/cadence/macb_pci.c:29:0:drivers/net/ethernet/cadence/macb.h:862:2: error: unknown type name 'phy_interface_t'
phy_interface_t phy_interface;
^~~~~~~~~~~~~~~Add linux/phy.h to macb.h
--- drivers/net/ethernet/cadence/macb.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/cadence/macb.h +2 -0
@@ -10,6 +10,8 @@#ifndef _MACB_H#define _MACB_H +#include <linux/phy.h> +#define MACB_GREGS_NBR 16#define MACB_GREGS_VERSION 2#define MACB_MAX_QUEUES 8
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdws-0000W9-GV-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Nicolas Ferre
Acked-byRe: [PATCH 4.10-rc3 03/13] net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h
Quoted 7 lines · Russell King
drivers/net/ethernet/cadence/macb.h:862:33: sparse: expected ; at end of declarationdrivers/net/ethernet/cadence/macb.h:862:33: sparse: Expected } at end of struct-union-enum-specifierdrivers/net/ethernet/cadence/macb.h:862:33: sparse: gotphy_interfacedrivers/net/ethernet/cadence/macb.h:877:1: sparse: Expected ; at the end of type declarationdrivers/net/ethernet/cadence/macb.h:877:1: sparse: got }
In file included fromdrivers/net/ethernet/cadence/macb_pci.c:29:0:drivers/net/ethernet/cadence/macb.h:862:2: error: unknown type name 'phy_interface_t'
Quoted 6 lines
phy_interface_t phy_interface; ^~~~~~~~~~~~~~~Add
linux/phy.htomacb.hSigned-off-by Russell King <[email protected]>
Quoted 18 lines
--- drivers/net/ethernet/cadence/macb.h | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/cadence/macb.h +2
-0@@ -10,6 +10,8 @@#ifndef _MACB_H#define _MACB_H +#include <linux/phy.h> +#define MACB_GREGS_NBR 16#define MACB_GREGS_VERSION 2#define MACB_MAX_QUEUES 8
Signature · 1 line
Nicolas Ferre
PATCH 4/13 net: lan78xx: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/usb/lan78xx.c:394:33: sparse: expected ; at end of declaration drivers/net/usb/lan78xx.c:394:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/usb/lan78xx.c:394:33: sparse: got interface drivers/net/usb/lan78xx.c:403:1: sparse: Expected ; at the end of type declaration drivers/net/usb/lan78xx.c:403:1: sparse: got }
Add linux/phy.h to lan78xx.c
--- drivers/net/usb/lan78xx.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/lan78xx.c +1 -0
@@ -35,6 +35,7 @@#include <linux/irq.h> #include <linux/irqchip/chained_irq.h> #include <linux/microchipphy.h> +#include <linux/phy.h> #include "lan78xx.h" #define DRIVER_AUTHOR "WOOJUNG HUH <[email protected]>"
Signature · 1 line
2.7.4
PATCH 5/13 net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/broadcom/bgmac.c:1015:17: error: dereferencing pointer to incomplete type 'struct mii_bus' drivers/net/ethernet/broadcom/bgmac.c:1185:2: error: implicit declaration of function 'phy_start' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1198:2: error: implicit declaration of function 'phy_stop' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1239:9: error: implicit declaration of function 'phy_mii_ioctl' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1389:28: error: 'phy_ethtool_get_link_ksettings' undeclared here (not in a function) drivers/net/ethernet/broadcom/bgmac.c:1390:28: error: 'phy_ethtool_set_link_ksettings' undeclared here (not in a function) drivers/net/ethernet/broadcom/bgmac.c:1403:13: error: dereferencing pointer to incomplete type 'struct phy_device' drivers/net/ethernet/broadcom/bgmac.c:1417:3: error: implicit declaration of function 'phy_print_status' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1424:26: error: storage size of 'fphy_status' isn't known drivers/net/ethernet/broadcom/bgmac.c:1424:9: error: variable 'fphy_status' has initializer but incomplete type drivers/net/ethernet/broadcom/bgmac.c:1425:11: warning: excess elements in struct initializer drivers/net/ethernet/broadcom/bgmac.c:1425:3: error: unknown field 'link' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1426:12: note: in expansion of macro 'SPEED_1000' drivers/net/ethernet/broadcom/bgmac.c:1426:3: error: unknown field 'speed' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1427:13: note: in expansion of macro 'DUPLEX_FULL' drivers/net/ethernet/broadcom/bgmac.c:1427:3: error: unknown field 'duplex' specified in initializer drivers/net/ethernet/broadcom/bgmac.c:1432:12: error: implicit declaration of function 'fixed_phy_register' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1432:31: error: 'PHY_POLL' undeclared (first use in this function) drivers/net/ethernet/broadcom/bgmac.c:1438:8: error: implicit declaration of function 'phy_connect_direct' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1439:6: error: 'PHY_INTERFACE_MODE_MII' undeclared (first use in this function) drivers/net/ethernet/broadcom/bgmac.c:1521:2: error: implicit declaration of function 'phy_disconnect' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1541:15: error: expected declaration specifiers or '...' before string constant
Add linux/phy.h to bgmac.c
--- drivers/net/ethernet/broadcom/bgmac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/broadcom/bgmac.c +2 -0
@@ -12,6 +12,8 @@#include <linux/bcma/bcma.h> #include <linux/etherdevice.h> #include <linux/bcm47xx_nvram.h> +#include <linux/phy.h> +#include <linux/phy_fixed.h> #include "bgmac.h" static bool bgmac_wait_value(struct bgmac *bgmac, u16 reg, u32 mask,
Signature · 1 line
2.7.4
Re: [PATCH 4.10-rc3 05/13] net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h
Quoted 23 lines · Russell King
drivers/net/ethernet/broadcom/bgmac.c:1015:17: error: dereferencing pointer to incomplete type 'structmii_bus'drivers/net/ethernet/broadcom/bgmac.c:1185:2: error: implicit declaration of function 'phy_start' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1198:2: error: implicit declaration of function 'phy_stop' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1239:9: error: implicit declaration of function 'phy_mii_ioctl' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1389:28: error: 'phy_ethtool_get_link_ksettings' undeclared here (not in a function)drivers/net/ethernet/broadcom/bgmac.c:1390:28: error: 'phy_ethtool_set_link_ksettings' undeclared here (not in a function)drivers/net/ethernet/broadcom/bgmac.c:1403:13: error: dereferencing pointer to incomplete type 'structphy_device'drivers/net/ethernet/broadcom/bgmac.c:1417:3: error: implicit declaration of function 'phy_print_status' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1424:26: error: storage size of 'fphy_status' isn't knowndrivers/net/ethernet/broadcom/bgmac.c:1424:9: error: variable 'fphy_status' has initializer but incomplete typedrivers/net/ethernet/broadcom/bgmac.c:1425:11: warning: excess elements in struct initializerdrivers/net/ethernet/broadcom/bgmac.c:1425:3: error: unknown field 'link' specified in initializerdrivers/net/ethernet/broadcom/bgmac.c:1426:12: note: in expansion of macro 'SPEED_1000'drivers/net/ethernet/broadcom/bgmac.c:1426:3: error: unknown field 'speed' specified in initializerdrivers/net/ethernet/broadcom/bgmac.c:1427:13: note: in expansion of macro 'DUPLEX_FULL'drivers/net/ethernet/broadcom/bgmac.c:1427:3: error: unknown field 'duplex' specified in initializerdrivers/net/ethernet/broadcom/bgmac.c:1432:12: error: implicit declaration of function 'fixed_phy_register' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1432:31: error: 'PHY_POLL' undeclared (first use in this function)drivers/net/ethernet/broadcom/bgmac.c:1438:8: error: implicit declaration of function 'phy_connect_direct' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1439:6: error: 'PHY_INTERFACE_MODE_MII' undeclared (first use in this function)drivers/net/ethernet/broadcom/bgmac.c:1521:2: error: implicit declaration of function 'phy_disconnect' [-Werror=implicit-function-declaration]drivers/net/ethernet/broadcom/bgmac.c:1541:15: error: expected declaration specifiers or '...' before string constant
Quoted 3 lines
Add
linux/phy.htobgmac.cSigned-off-by Russell King <[email protected]>
PATCH 6/13 net: fman: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/freescale/fman/fman_memac.c:519:21: error: dereferencing pointer to incomplete type 'struct fixed_phy_status'
Add linux/phy_fixed.h to fman_memac.c
--- drivers/net/ethernet/freescale/fman/fman_memac.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/freescale/fman/fman_memac.c +1 -0
@@ -38,6 +38,7 @@#include <linux/slab.h> #include <linux/io.h> #include <linux/phy.h> +#include <linux/phy_fixed.h> #include <linux/of_mdio.h> /* PCS registers */
Signature · 1 line
2.7.4
PATCH 7/13 net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/marvell/mvneta.c:2694:26: error: storage size of 'status' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:26: error: storage size of 'changed' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:9: error: variable 'changed' has initializer but incomplete type drivers/net/ethernet/marvell/mvneta.c:2709:2: error: implicit declaration of function 'fixed_phy_update_state' [-Werror=implicit-function-declaration]
Add linux/phy_fixed.h to mvneta.c
--- drivers/net/ethernet/marvell/mvneta.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/mvneta.c +1 -0
@@ -28,6 +28,7 @@#include <linux/of_mdio.h> #include <linux/of_net.h> #include <linux/phy.h> +#include <linux/phy_fixed.h> #include <linux/platform_device.h> #include <linux/skbuff.h> #include <net/hwbm.h>
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdxD-0000Wd-1D-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Thomas Petazzoni
Acked-byRe: [PATCH 4.10-rc3 07/13] net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h
Hello,
Quoted 8 lines · Russell King
drivers/net/ethernet/marvell/mvneta.c:2694:26: error: storage size of 'status' isn't knowndrivers/net/ethernet/marvell/mvneta.c:2695:26: error: storage size of 'changed' isn't knowndrivers/net/ethernet/marvell/mvneta.c:2695:9: error: variable 'changed' has initializer but incomplete typedrivers/net/ethernet/marvell/mvneta.c:2709:2: error: implicit declaration of function 'fixed_phy_update_state' [-Werror=implicit-function-declaration]Add
linux/phy_fixed.htomvneta.cSigned-off-by Russell King <[email protected]>
Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 8/13 net: emac: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/qualcomm/emac/emac-sgmii.c:58:12: error: dereferencing pointer to incomplete type 'struct phy_device'
Add linux/phy.h to emac-sgmii.c
--- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c +1 -0
@@ -16,6 +16,7 @@#include <linux/iopoll.h> #include <linux/acpi.h> #include <linux/of_device.h> +#include <linux/phy.h> #include "emac.h" #include "emac-mac.h" #include "emac-sgmii.h"
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdxI-0000Wk-5w-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Re: [PATCH 4.10-rc3 08/13] net: emac: fix build errors when linux/phy*.h is removed from net/dsa.h
Quoted 7 lines · Russell King
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c:58:12: error: dereferencing pointer to incomplete type 'structphy_device'Add
linux/phy.htoemac-sgmii.cSigned-off-by Russell King <[email protected]>--- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 +
The version of emac-sgmii.c on net-next does not need this fixed. I already removed all references to phy_device in commit "net: qcom/emac: always use autonegotiation to configure the SGMII link".
Signature · 7 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 9/13 iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]
Add linux/module.h to iscsi_target_login.c.
--- drivers/target/iscsi/iscsi_target_login.c | 1 + 1 file changed, 1 insertion(+)
drivers/target/iscsi/iscsi_target_login.c +1 -0
@@ -17,6 +17,7 @@******************************************************************************/ #include <crypto/hash.h> +#include <linux/module.h> #include <linux/string.h> #include <linux/kthread.h> #include <linux/idr.h>
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdxN-0000Wr-AS-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Bart Van Assche
Reviewed-byRe: [PATCH 4.10-rc3 09/13] iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h
Quoted 14 lines · Russell King
drivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]Add
linux/module.htoiscsi_target_login.c.Signed-off-by Russell King <[email protected]>--- drivers/target/iscsi/iscsi_target_login.c | 1 + 1 file changed, 1 insertion(+)drivers/target/iscsi/iscsi_target_login.c +0
-0
drivers/target/iscsi/iscsi_target_login.c line 23
Quoted 7 lines
drivers/target/iscsi/iscsi_target_login.c +1
-0@@ -17,6 +17,7 @@******************************************************************************/ #include <crypto/hash.h> +#include <linux/module.h> #include <linux/string.h> #include <linux/kthread.h> #include <linux/idr.h>
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 10/13 MIPS: Octeon: Remove unnecessary MODULE_*()
In reply to Russell King - ARM Linuxocteon-platform.c can not be built as a module for two reasons:
(a) the Makefile doesn't allow it:
obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o
(b) the multiple *_initcall() statements, each of which are translated to a module_init() call when attempting a module build, become aliases to init_module(). Having more than one alias will cause a build error.
Hence, rather than adding a linux/module.h include, remove the redundant MODULE_*() from this file.
--- arch/mips/cavium-octeon/octeon-platform.c | 4 ---- 1 file changed, 4 deletions(-)
arch/mips/cavium-octeon/octeon-platform.c +0 -4
@@ -1060,7 +1060,3 @@ static int __init octeon_publish_devices(void)return of_platform_bus_probe (NULL , octeon_ids,NULL ); }arch_initcall (octeon_publish_devices); - -MODULE_AUTHOR ("David Daney <[email protected]>" ); -MODULE_LICENSE ("GPL" ); -MODULE_DESCRIPTION ("Platform driver for Octeon SOC" );
Signature · 1 line
2.7.4
PATCH 11/13 net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM Linuxdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: type defaults to 'int' in declaration of 'MODULE_VERSION' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:36: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:37: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: error: type defaults to 'int' in declaration of 'module_init' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: error: type defaults to 'int' in declaration of 'module_exit' drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:36: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:37: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:38: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:39: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: type defaults to 'int' in declaration of 'MODULE_VERSION' drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:40: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:41: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:42: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:43: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE' drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: function declaration isn't a prototype drivers/net/ethernet/cavium/liquidio/lio_main.c:46: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_main.c:48: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:53: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/lio_main.c:54: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:57: error: expected ')' before 'sizeof' drivers/net/ethernet/cavium/liquidio/lio_main.c:58: error: expected ')' before string constant drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: data definitionhas no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:498: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_recv_vf_drv_notice':drivers/net/ethernet/cavium/liquidio/lio_main.c:4393: error: implicit declaration of function 'try_module_get' drivers/net/ethernet/cavium/liquidio/lio_main.c:4400: error: implicit declaration of function 'module_put' drivers/net/ethernet/cavium/liquidio/lio_main.c: At top level:drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: error: type defaults to 'int' in declaration of 'module_init' drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: parameter names (without types) in function declaration drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: error: type defaults to 'int' in declaration of 'module_exit' drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: parameter names (without types) in function declaration
Add linux/module.h to both these files.
drivers/net/ethernet/cavium/liquidio/octeon_console.c:40:31: error: expected ')' before 'int' drivers/net/ethernet/cavium/liquidio/octeon_console.c:42:4: error: expected ')' before string constant
Add linux/moduleparam.h to this file.
--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 + drivers/net/ethernet/cavium/liquidio/octeon_console.c | 1 + 3 files changed, 3 insertions(+)
drivers/net/ethernet/cavium/liquidio/lio_main.c +1 -0
@@ -15,6 +15,7 @@* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or * NONINFRINGEMENT. See the GNU General Public License for more details. ***********************************************************************/ +#include <linux/module.h> #include <linux/pci.h> #include <linux/firmware.h> #include <net/vxlan.h>
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +1 -0
@@ -15,6 +15,7 @@* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or * NONINFRINGEMENT. See the GNU General Public License for more details. ***********************************************************************/ +#include <linux/module.h> #include <linux/pci.h> #include <net/vxlan.h> #include "liquidio_common.h"
drivers/net/ethernet/cavium/liquidio/octeon_console.c +1 -0
@@ -18,6 +18,7 @@/** * @file octeon_console.c */ +#include <linux/moduleparam.h> #include <linux/pci.h> #include <linux/netdevice.h> #include <linux/crc32.h>
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): E1cYdxX-0000X5-Hz-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org
Felix Manlunas
Acked-byRe: [PATCH 4.10-rc3 11/13] net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h
Russell King <[email protected]> wrote on Tue [2017-Jan-31 19:19:19 +0000]:
Quoted 79 lines
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: type defaults to 'int' in declaration of 'MODULE_VERSION'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:36: error: expected ')' before 'int'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:37: error: expected ')' before string constantdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: parameter names (without types) in function declarationdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: error: type defaults to 'int' in declaration of 'module_init'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: parameter names (without types) in function declarationdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: error: type defaults to 'int' in declaration of 'module_exit'drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: parameter names (without types) in function declarationdrivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:36: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:37: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:38: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:39: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: type defaults to 'int' in declaration of 'MODULE_VERSION'drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:40: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:41: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:42: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: expected declaration specifiers or '...' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:43: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: function declaration isn't a prototypedrivers/net/ethernet/cavium/liquidio/lio_main.c:46: error: expected ')' before 'int'drivers/net/ethernet/cavium/liquidio/lio_main.c:48: error: expected ')' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:53: error: expected ')' before 'int'drivers/net/ethernet/cavium/liquidio/lio_main.c:54: error: expected ')' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:57: error: expected ')' before 'sizeof'drivers/net/ethernet/cavium/liquidio/lio_main.c:58: error: expected ')' before string constantdrivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: data definitionhas no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:498: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: parameter names (without types) in function declarationdrivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_recv_vf_drv_notice':drivers/net/ethernet/cavium/liquidio/lio_main.c:4393: error: implicit declaration of function 'try_module_get'drivers/net/ethernet/cavium/liquidio/lio_main.c:4400: error: implicit declaration of function 'module_put'drivers/net/ethernet/cavium/liquidio/lio_main.c: At top level:drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:4670: error: type defaults to 'int' in declaration of 'module_init'drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: parameter names (without types) in function declarationdrivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: data definition has no type or storage classdrivers/net/ethernet/cavium/liquidio/lio_main.c:4671: error: type defaults to 'int' in declaration of 'module_exit'drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: parameter names (without types) in function declaration
Quoted 8 lines
Add
linux/module.hto both these files.
drivers/net/ethernet/cavium/liquidio/octeon_console.c:40:31: error: expected ')' before 'int'drivers/net/ethernet/cavium/liquidio/octeon_console.c:42:4: error: expected ')' before string constantAdd
linux/moduleparam.hto this file.Signed-off-by Russell King <[email protected]>
Thank you.
PATCH 12/13 net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Russell King - ARM LinuxFix these errors reported by the 0-day builder by replacing the linux/export.h include with linux/module.h.
In file included from include/linux/platform_device.h:14:0,
from drivers/net/wireless/ath/ath5k/ahb.c:20:include/linux/device.h:1463:1: warning: data definition has no type or storage class
module_init(__driver##_init); \
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~include/linux/device.h:1463:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
module_init(__driver##_init); \
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included from include/linux/platform_device.h:14:0,
from drivers/net/wireless/ath/ath5k/ahb.c:20:include/linux/device.h:1468:1: warning: data definition has no type or storage class
module_exit(__driver##_exit);
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~include/linux/device.h:1468:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
module_exit(__driver##_exit);
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included from include/linux/platform_device.h:14:0,
from drivers/net/wireless/ath/ath5k/ahb.c:20:drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_exit' defined but not used [-Wunused-function]
module_platform_driver(ath_ahb_driver);
^
include/linux/device.h:1464:20: note: in definition of macro 'module_driver'
static void __exit __driver##_exit(void) \
^~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_init' defined but not used [-Wunused-function]
module_platform_driver(ath_ahb_driver);
^
include/linux/device.h:1459:19: note: in definition of macro 'module_driver'
static int __init __driver##_init(void) \
^~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~
--- drivers/net/wireless/ath/ath5k/ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath5k/ahb.c +1 -1
@@ -16,10 +16,10 @@* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <linux/module.h> #include <linux/nl80211.h> #include <linux/platform_device.h> #include <linux/etherdevice.h> -#include <linux/export.h> #include <ath25_platform.h> #include "ath5k.h" #include "debug.h"
Signature · 1 line
2.7.4
Re: [PATCH 4.10-rc3 12/13] net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h
Quoted 62 lines · Russell King
Fix these errors reported by the 0-day builder by replacing the
linux/export.hinclude withlinux/module.h.In file included from
include/linux/platform_device.h:14:0,
fromdrivers/net/wireless/ath/ath5k/ahb.c:20:include/linux/device.h:1463:1: warning: data definition has no type or storage class
module_init(__driver##_init); \
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver,platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~include/linux/device.h:1463:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
module_init(__driver##_init); \
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver,platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included frominclude/linux/platform_device.h:14:0,
fromdrivers/net/wireless/ath/ath5k/ahb.c:20:include/linux/device.h:1468:1: warning: data definition has no type or storage class
module_exit(__driver##_exit);
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver,platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~include/linux/device.h:1468:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
module_exit(__driver##_exit);
^include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver,platform_driver_register, \
^~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration In file included frominclude/linux/platform_device.h:14:0,
fromdrivers/net/wireless/ath/ath5k/ahb.c:20:drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_exit' defined but not used [-Wunused-function]module_platform_driver(ath_ahb_driver); ^ include/linux/device.h:1464:20: note: in definition of macro 'module_driver' static void __exit __driver##_exit(void) \ ^~~~~~~~
drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_init' defined but not used [-Wunused-function]module_platform_driver(ath_ahb_driver); ^ include/linux/device.h:1459:19: note: in definition of macro 'module_driver' static int __init __driver##_init(void) \ ^~~~~~~~
Quoted 5 lines
drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(ath_ahb_driver);
^~~~~~~~~~~~~~~~~~~~~~Signed-off-by Russell King <[email protected]>
Looks good to me:
I assume Dave will take this so I'll drop the patch from my queue.
Signature · 1 line
Kalle Valo
PATCH 13/13 net: dsa: remove unnecessary phy*.h includes
In reply to Russell King - ARM LinuxIncluding phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.
Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h and phy_fixed.h from net/dsa.h.
This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
--- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + include/net/dsa.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +1 -0
@@ -15,6 +15,7 @@#include <linux/if_vlan.h> #include <linux/irq.h> #include <linux/gpio/consumer.h> +#include <linux/phy.h> #ifndef UINT64_MAX #define UINT64_MAX (u64)(~((u64)0))
include/net/dsa.h +4 -2
@@ -11,15 +11,17 @@#ifndef __LINUX_NET_DSA_H#define __LINUX_NET_DSA_H +#include <linux/if.h> #include <linux/if_ether.h> #include <linux/list.h> #include <linux/timer.h> #include <linux/workqueue.h> #include <linux/of.h> -#include <linux/phy.h> -#include <linux/phy_fixed.h> #include <linux/ethtool.h> +struct phy_device ; +struct fixed_phy_status ; +enum dsa_tag_protocol {DSA_TAG_PROTO_NONE =0 , DSA_TAG_PROTO_DSA,
Signature · 1 line
2.7.4
Quoted 17 lines · Russell King - ARM Linux
Including
phy.handphy_fixed.hintonet/dsa.hcauses phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions fromphy.hinnet/dsa.h
- the include itself only wants the declaration of a couple of structures and IFNAMSIZ.Add
linux/if.hfor IFNAMSIZ, declarations for the structures,phy.htomv88e6xxx.has it needs it forphy_interface_t, and remove bothphy.handphy_fixed.hfromnet/dsa.h.This patch reduces from around 800 files rebuilt to around 40 - even with ccache, the time difference is noticable.
In order to make this change, several drivers need to be updated to include necessary headers that they were picking up through this include. This has resulted in a much larger patch series.
Quoted 5 lines
I'm assuming the 0-day builder has had 24 hours with this series, and hasn't reported any further issues with it - the last issue was two weeks ago (before I became ill) which I fixed over the last weekend.
I'm hoping this doesn't conflict with what's already in net-next...
For the entire series:
Thanks a lot for doing that.
Quoted 19 lines
arch/mips/cavium-octeon/octeon-platform.c | 4 ---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/ethernet/broadcom/bgmac.c | 2 ++ drivers/net/ethernet/cadence/macb.h | 2 ++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 + drivers/net/ethernet/cavium/liquidio/octeon_console.c | 1 + drivers/net/ethernet/freescale/fman/fman_memac.c | 1 + drivers/net/ethernet/marvell/mvneta.c | 1 + drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + drivers/net/usb/lan78xx.c | 1 + drivers/net/wireless/ath/ath5k/ahb.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 1 + include/net/dsa.h | 6 ++++-- net/core/netprio_cgroup.c | 1 + net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 16 files changed, 20 insertions(+), 7 deletions(-)
Signature · 1 line
Florian