mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
net: ethtool: re-order local includes
Most local #include in the ethtool command handling is out of order, with either : #include "netlink.h" #include "common.h" or even : #include "netlink.h" #include "common.h" #include "bitset.h" One of the reasons is because bitset.h s lacking definitions for nlattr, netlink_ext_ack, ETH_GSTRING_LEN, and types such as u32, bool, etc. Make bitset.h standalone by including <linux/ethtool.h> for ETH_GSTRING_LEN, and <linux/netlink.h> for nlattr, netlink_ext_ack and the rest. While at it, take a pass on ethnl sources to re-order the local includes : - put them after the global includes - add a newline between global and local includes - alpha-sort the local includes One notable exception is the cmis.h include, that needs definitions from module_fw.h. Keep them in this order for now. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260319180555.1531386-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e783e40fb6
commit
82a5852595
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <linux/ethtool_netlink.h>
|
||||
#include <linux/bitmap.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "bitset.h"
|
||||
#include "netlink.h"
|
||||
|
||||
/* Some bitmaps are internally represented as an array of unsigned long, some
|
||||
* as an array of u32 (some even as single u32 for now). To avoid the need of
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#ifndef _NET_ETHTOOL_BITSET_H
|
||||
#define _NET_ETHTOOL_BITSET_H
|
||||
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/netlink.h>
|
||||
|
||||
#define ETHNL_MAX_BITSET_SIZE S16_MAX
|
||||
|
||||
typedef const char (*const ethnl_string_array_t)[ETH_GSTRING_LEN];
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
#include <linux/phy.h>
|
||||
#include <linux/ethtool_netlink.h>
|
||||
#include <net/netdev_lock.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
/* 802.3 standard allows 100 meters for BaseT cables. However longer
|
||||
* cables might work, depending on the quality of the cables and the
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <net/xdp_sock_drv.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct channels_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <linux/dim.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct coalesce_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#include <linux/phy_link_topology.h>
|
||||
#include <net/netdev_queues.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
#include "../core/dev.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct debug_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct eee_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/sfp.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct eeprom_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct features_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct fec_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <net/flow_offload.h>
|
||||
#include <net/netdev_lock.h>
|
||||
#include <linux/ethtool_netlink.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* State held across locks and calls for commands which have devlink fallback */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct linkinfo_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
/* LINKMODES_GET */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include <linux/phy.h>
|
||||
#include <linux/phylib_stubs.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct linkstate_req_info {
|
||||
struct ethnl_req_info base;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
#include <net/devlink.h>
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "module_fw.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct module_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <linux/phy.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
/* Channels A-D only; WORST and LINK are exclusive alternatives */
|
||||
#define PHY_MSE_CHANNEL_COUNT 4
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
#include <linux/ethtool_netlink.h>
|
||||
#include <linux/phy_link_topology.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "module_fw.h"
|
||||
#include "netlink.h"
|
||||
|
||||
static struct genl_family ethtool_genl_family;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct pause_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
/*
|
||||
* Copyright 2021 NXP
|
||||
*/
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct phc_vclocks_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
* Copyright 2023 Bootlin
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
#include <linux/phy.h>
|
||||
#include <linux/phy_link_topology.h>
|
||||
#include <linux/sfp.h>
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct phy_req_info {
|
||||
struct ethnl_req_info base;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <linux/phy.h>
|
||||
#include <linux/ethtool_netlink.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct plca_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct privflags_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@
|
|||
// Copyright (c) 2022 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
|
||||
//
|
||||
|
||||
#include "common.h"
|
||||
#include "linux/pse-pd/pse.h"
|
||||
#include "netlink.h"
|
||||
#include <linux/ethtool_netlink.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/phy.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "linux/pse-pd/pse.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct pse_req_info {
|
||||
struct ethnl_req_info base;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <net/netdev_queues.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct rings_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct rss_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
#include <linux/phy.h>
|
||||
#include <linux/phylib_stubs.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct stats_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/phy.h>
|
||||
#include "netlink.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct strset_info {
|
||||
bool per_dev;
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
#include <linux/net_tstamp.h>
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "../core/dev.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
#include "ts.h"
|
||||
#include "../core/dev.h"
|
||||
|
||||
struct tsconfig_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
#include <linux/ptp_clock_kernel.h>
|
||||
#include <net/netdev_lock.h>
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
#include "ts.h"
|
||||
|
||||
struct tsinfo_req_info {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include "netlink.h"
|
||||
#include "common.h"
|
||||
#include "bitset.h"
|
||||
#include "common.h"
|
||||
#include "netlink.h"
|
||||
|
||||
struct wol_req_info {
|
||||
struct ethnl_req_info base;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user