]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ethtool: re-order local includes
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 19 Mar 2026 18:05:54 +0000 (19:05 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Mar 2026 02:10:18 +0000 (19:10 -0700)
commit82a5852595f5afb36aebddcc3ebc2654ee4d3879
tree657bc411f96ba9bf778ba82c6138d9d8a6c6f32a
parente783e40fb689381caca31e03d28c39e10c82e722
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>
31 files changed:
net/ethtool/bitset.c
net/ethtool/bitset.h
net/ethtool/cabletest.c
net/ethtool/channels.c
net/ethtool/coalesce.c
net/ethtool/common.c
net/ethtool/debug.c
net/ethtool/eee.c
net/ethtool/eeprom.c
net/ethtool/features.c
net/ethtool/fec.c
net/ethtool/ioctl.c
net/ethtool/linkinfo.c
net/ethtool/linkmodes.c
net/ethtool/linkstate.c
net/ethtool/module.c
net/ethtool/mse.c
net/ethtool/netlink.c
net/ethtool/pause.c
net/ethtool/phc_vclocks.c
net/ethtool/phy.c
net/ethtool/plca.c
net/ethtool/privflags.c
net/ethtool/pse-pd.c
net/ethtool/rings.c
net/ethtool/rss.c
net/ethtool/stats.c
net/ethtool/strset.c
net/ethtool/tsconfig.c
net/ethtool/tsinfo.c
net/ethtool/wol.c