net: don't include ethtool.h from netdevice.h

linux/netdevice.h is included in very many places, touching any
of its dependecies causes large incremental builds.

Drop the linux/ethtool.h include, linux/netdevice.h just needs
a forward declaration of struct ethtool_ops.

Fix all the places which made use of this implicit include.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Link: https://lore.kernel.org/r/20201120225052.1427503-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2020-11-20 14:50:52 -08:00
parent 7fd6372e27
commit cc69837fca
45 changed files with 51 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/ethtool.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/major.h>

View File

@ -11,6 +11,7 @@
* the project's page is at https://linuxtv.org
*/
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/proc_fs.h>
#include <linux/ethtool.h>
#include <linux/export.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>

View File

@ -9,6 +9,7 @@
* Many thanks to all socketcan devs!
*/
#include <linux/ethtool.h>
#include <linux/init.h>
#include <linux/signal.h>
#include <linux/module.h>

View File

@ -3,6 +3,7 @@
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
#include <linux/ethtool.h>
#include <linux/pci.h>
#include "ena_netdev.h"

View File

@ -10,6 +10,8 @@
#ifndef AQ_NIC_H
#define AQ_NIC_H
#include <linux/ethtool.h>
#include "aq_common.h"
#include "aq_rss.h"
#include "aq_hw.h"

View File

@ -20,6 +20,7 @@
#define DRV_VER_MIN 10
#define DRV_VER_UPD 1
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/rhashtable.h>
#include <linux/crash_dump.h>

View File

@ -8,6 +8,7 @@
* the Free Software Foundation.
*/
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>

View File

@ -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/ethtool.h>
#include <linux/netdevice.h>
#include <linux/net_tstamp.h>
#include <linux/pci.h>

View File

@ -5,6 +5,7 @@
/* ETHTOOL Support for VNIC_VF Device*/
#include <linux/ethtool.h>
#include <linux/pci.h>
#include <linux/net_tstamp.h>

View File

@ -39,6 +39,7 @@
#include <linux/bitops.h>
#include <linux/cache.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/netdevice.h>

View File

@ -33,6 +33,7 @@
* SOFTWARE.
*/
#include <linux/ethtool.h>
#include <linux/pci.h>
#include "t4vf_common.h"

View File

@ -4,6 +4,7 @@
* Copyright (C) 2015-2019 Google, Inc.
*/
#include <linux/ethtool.h>
#include <linux/rtnetlink.h>
#include "gve.h"
#include "gve_adminq.h"

View File

@ -25,6 +25,7 @@
#include <linux/dcbnl.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/pci.h>

View File

@ -8,6 +8,7 @@
#define HINIC_PORT_H
#include <linux/types.h>
#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/bitops.h>

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2013 - 2019 Intel Corporation. */
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include "fm10k.h"

View File

@ -11,6 +11,7 @@
#ifndef OTX2_COMMON_H
#define OTX2_COMMON_H
#include <linux/ethtool.h>
#include <linux/pci.h>
#include <linux/iommu.h>
#include <linux/net_tstamp.h>

View File

@ -36,6 +36,7 @@
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/ethtool.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>

View File

@ -4,6 +4,9 @@
#ifndef _MLXSW_CORE_ENV_H
#define _MLXSW_CORE_ENV_H
struct ethtool_modinfo;
struct ethtool_eeprom;
int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, int module,
int off, int *temp);

View File

@ -4,6 +4,7 @@
#ifndef _MLXSW_SPECTRUM_H
#define _MLXSW_SPECTRUM_H
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/rhashtable.h>

View File

@ -6,6 +6,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/slab.h>
#include <linux/device.h>

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
#include <linux/ethtool.h>
#include <linux/printk.h>
#include <linux/dynamic_debug.h>
#include <linux/netdevice.h>

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>

View File

@ -5,6 +5,7 @@
*/
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/if_arp.h>
#include <net/pkt_sched.h>
#include "rmnet_config.h"

View File

@ -7,6 +7,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/etherdevice.h>

View File

@ -10,6 +10,7 @@
#include <linux/init.h>
#include <linux/atomic.h>
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/highmem.h>
#include <linux/device.h>

View File

@ -6,6 +6,7 @@
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
*/
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/wait.h>

View File

@ -2,6 +2,8 @@
/* Copyright (c) 2014 Mahesh Bandewar <maheshb@google.com>
*/
#include <linux/ethtool.h>
#include "ipvlan.h"
static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval,

View File

@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>

View File

@ -4,6 +4,7 @@
* Copyright (c) 2011 Jiri Pirko <jpirko@redhat.com>
*/
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>

View File

@ -9,6 +9,7 @@
* Based on dummy, team and ipvlan drivers
*/
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>

View File

@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/if_arp.h>

View File

@ -16,6 +16,8 @@
#include "bnx2fc.h"
#include <linux/ethtool.h>
static struct list_head adapter_list;
static struct list_head if_list;
static u32 adapter_count;

View File

@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/errno.h>
#include <linux/crc32.h>
#include <scsi/libfcoe.h>

View File

@ -7,6 +7,8 @@
*
*/
#include <linux/ethtool.h>
#include "ethsw.h"
static struct {

View File

@ -51,6 +51,7 @@
#include "i2400m-usb.h"
#include "linux-wimax-i2400m.h"
#include <linux/debugfs.h>
#include <linux/ethtool.h>
#include <linux/slab.h>
#include <linux/module.h>

View File

@ -34,7 +34,6 @@
#include <linux/workqueue.h>
#include <linux/dynamic_queue_limits.h>
#include <linux/ethtool.h>
#include <net/net_namespace.h>
#ifdef CONFIG_DCB
#include <net/dcbnl.h>
@ -51,6 +50,7 @@
struct netpoll_info;
struct device;
struct ethtool_ops;
struct phy_device;
struct dsa_port;
struct ip_tunnel_parm;

View File

@ -7,6 +7,7 @@
#ifndef _QED_IF_H
#define _QED_IF_H
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>

View File

@ -10,6 +10,7 @@
* Copyright (C) 2018-2020 Intel Corporation
*/
#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/debugfs.h>
#include <linux/list.h>

View File

@ -7,6 +7,7 @@
#ifndef IB_ADDR_H
#define IB_ADDR_H
#include <linux/ethtool.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/if_arp.h>

View File

@ -12,6 +12,7 @@
#ifndef IB_VERBS_H
#define IB_VERBS_H
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>

View File

@ -46,6 +46,7 @@
* Copyright (C) 2011, <lokec@ccs.neu.edu>
*/
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/capability.h>

View File

@ -50,6 +50,7 @@
* locredit = max_frame_size * (sendslope / port_transmit_rate)
*/
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>

View File

@ -6,6 +6,7 @@
*
*/
#include <linux/ethtool.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/kernel.h>

View File

@ -52,6 +52,7 @@
* Based upon Swansea University Computer Society NET3.039
*/
#include <linux/ethtool.h>
#include <linux/mm.h>
#include <linux/socket.h>
#include <linux/file.h>