net: dsa: remove unnecessary phy.h include
Subsystems (17)
v2 cover net: dsa: remove unnecessary phy.h include
Hi all,
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.
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...
David, this should probably go via your tree considering the diffstat.
Changes in v2:
- took Russell's patch series
- removed Qualcomm EMAC patch
- rebased against net-next/master
Russell King (12):
net: sunrpc: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: cgroups: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: macb: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: lan78xx: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: bgmac: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: fman: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: mvneta: fix build errors when linux/phy*.h is removed from
net/dsa.h
iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h
MIPS: Octeon: Remove unnecessary MODULE_*()
net: liquidio: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: ath5k: fix build errors when linux/phy*.h is removed from
net/dsa.h
net: dsa: remove unnecessary phy*.h includes
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/usb/lan78xx.c | 1 + drivers/net/wireless/ath/ath5k/ahb.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 1 + include/net/dsa.h | 5 +++-- net/core/netprio_cgroup.c | 1 + net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + 15 files changed, 18 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.3
PATCH v2 1/12 net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h
From: Russell King <[email protected]>
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.9.3
PATCH v2 2/12 net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Florian FainelliFrom: Russell King <[email protected]>
net/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.9.3
PATCH v2 3/12 net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Florian FainelliFrom: Russell King <[email protected]>
drivers/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.9.3
PATCH v2 4/12 net: lan78xx: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Florian FainelliFrom: Russell King <[email protected]>
drivers/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.9.3
PATCH v2 5/12 net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Florian FainelliFrom: Russell King <[email protected]>
drivers/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.9.3
A message that is not in the archive (sent off-list or not yet received): 20170207230305.18222-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH v2 6/12 net: fman: fix build errors when linux/phy*.h is removed from net/dsa.h
From: Russell King <[email protected]>
drivers/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 · 6 lines
2.9.3 -- 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 v2 8/12 iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to a message not in the archiveFrom: Russell King <[email protected]>
drivers/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 · 6 lines
2.9.3 -- 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
Re: [PATCH net-next v2 08/12] iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h
Hi Florian,
Quoted 9 lines · Florian Fainelli
From: Russell King <[email protected]>
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]>Reviewed-by Bart Van Assche <[email protected]>---
PATCH v2 10/12 net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to a message not in the archiveFrom: Russell King <[email protected]>
drivers/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.9.3
PATCH v2 11/12 net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to a message not in the archiveFrom: Russell King <[email protected]>
Fix 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 · 6 lines
2.9.3 -- 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 v2 7/12 net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h
In reply to Florian FainelliFrom: Russell King <[email protected]>
drivers/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.9.3
PATCH v2 9/12 MIPS: Octeon: Remove unnecessary MODULE_*()
In reply to Florian FainelliFrom: Russell King <[email protected]>
octeon-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.9.3
PATCH v2 12/12 net: dsa: remove unnecessary phy*.h includes
In reply to Florian FainelliFrom: Russell King <[email protected]>
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.
--- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + include/net/dsa.h | 5 +++-- 2 files changed, 4 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 +3 -2
@@ -11,17 +11,18 @@#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/notifier.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 tc_action ; +struct phy_device ; +struct fixed_phy_status ;enum dsa_tag_protocol { DSA_TAG_PROTO_NONE = 0,
Signature · 1 line
2.9.3
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Tue, 7 Feb 2017 15:02:53 -0800
Quoted 3 lines
I'm hoping this doesn't conflict with what's already in net-next...
David, this should probably go via your tree considering the diffstat.
I think you need one more respin. Are you doing an allmodconfig build? If not, for something like this it's a must:
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’
module_param(disable_ap_sme, bool, 0444);
^
drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant
MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME");
^Like like that file needs linux/module.h included.
Thanks.
Quoted 10 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Tue, 7 Feb 2017 15:02:53 -0800Quoted 3 lines
I'm hoping this doesn't conflict with what's already in net-next...
David, this should probably go via your tree considering the diffstat.
I think you need one more respin. Are you doing an allmodconfig build? If not, for something like this it's a must:
Quoted 7 lines
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’module_param(disable_ap_sme, bool, 0444); ^ drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME"); ^Like like that file needs
linux/module.hincluded.
Johannes already fixed a similar (or same) problem in my tree:
wil6210: include moduleparam.h
I'm planning to send you a pull request tomorrow which contains that one.
Signature · 1 line
Kalle Valo
Quoted 10 lines · Kalle Valo
Quoted 8 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Tue, 7 Feb 2017 15:02:53 -0800Quoted 3 lines
I'm hoping this doesn't conflict with what's already in net-next...
David, this should probably go via your tree considering the diffstat.
I think you need one more respin. Are you doing an allmodconfig build?
I did not, instead tried to test each driver individually in different configurations...
Quoted 10 lines
Quoted 9 lines
If not, for something like this it's a must:
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’module_param(disable_ap_sme, bool, 0444); ^ drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME"); ^Like like that file needs
linux/module.hincluded.
Quoted 8 lines
Johannes already fixed a similar (or same) problem in my tree:
wil6210: include
moduleparam.hI'm planning to send you a pull request tomorrow which contains that one.
Thanks Kalle!
David, can you hold on this series until Kalle's pull request gets submitted? Past this error, allmodconfig builds fine with this patch series (just tested). Thanks!
Signature · 1 line
Florian
Quoted 16 lines · Florian Fainelli
Quoted 16 lines
Quoted 9 lines
If not, for something like this it's a must:
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’module_param(disable_ap_sme, bool, 0444); ^ drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME"); ^Like like that file needs
linux/module.hincluded.Johannes already fixed a similar (or same) problem in my tree:
wil6210: include
moduleparam.h
Quoted 8 lines
Quoted 2 lines
I'm planning to send you a pull request tomorrow which contains that one.
Thanks Kalle!
David, can you hold on this series until Kalle's pull request gets submitted? Past this error, allmodconfig builds fine with this patch series (just tested). Thanks!
Just submitted the pull request:
https://patchwork.ozlabs.org/patch/726133/
Signature · 1 line
Kalle Valo
David Miller
maintainerFrom: Kalle Valo <[email protected]>
Date: Thu, 09 Feb 2017 16:10:06 +0200
Quoted 23 lines
Quoted 21 lines · Florian Fainelli
Quoted 10 lines
Quoted 9 lines
If not, for something like this it's a must:
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’module_param(disable_ap_sme, bool, 0444); ^ drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME"); ^Like like that file needs
linux/module.hincluded.Quoted 8 lines
Johannes already fixed a similar (or same) problem in my tree:
wil6210: include
moduleparam.hI'm planning to send you a pull request tomorrow which contains that one.
Thanks Kalle!
Quoted 7 lines
Quoted 3 lines
David, can you hold on this series until Kalle's pull request gets submitted? Past this error, allmodconfig builds fine with this patch series (just tested). Thanks!
Just submitted the pull request:
I've retried this patch series, and will push it out assuming the build completes properly.
Quoted 30 lines · David Miller
From: Kalle Valo <[email protected]>
Date: Thu, 09 Feb 2017 16:10:06 +0200Quoted 27 lines
Quoted 24 lines · Florian Fainelli
Quoted 10 lines
Quoted 9 lines
If not, for something like this it's a must:
drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’module_param(disable_ap_sme, bool, 0444); ^ drivers/net/wireless/ath/wil6210/cfg80211.c:25:34: error: expected ‘)’ before string constant MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME"); ^Like like that file needs
linux/module.hincluded.Quoted 8 lines
Johannes already fixed a similar (or same) problem in my tree:
wil6210: include
moduleparam.hI'm planning to send you a pull request tomorrow which contains that one.
Thanks Kalle!
David, can you hold on this series until Kalle's pull request gets submitted? Past this error, allmodconfig builds fine with this patch series (just tested). Thanks!
Quoted 6 lines
Quoted 3 lines
Just submitted the pull request:
I've retried this patch series, and will push it out assuming the build completes properly.
I see it merged in net-next/master, thanks a lot this is going to save a lot of cycles in the future, thanks David!
Signature · 1 line
Florian