Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bonding: remove bonding_priv.h

bonding_priv.h only defined DRV_NAME and DRV_DESCRIPTION, but caused
unnecessary recompilation: it included <generated/utsrelease.h> to
define bond_version, which is used solely in bond_procfs.c. With
CONFIG_LOCALVERSION_AUTO=y, utsrelease.h is regenerated on every git
commit, so any git operation triggered recompilation of bond_main.c
which also included bonding_priv.h.

Remove the header entirely, as suggested by Jakub, given the macros on
this file can be integrated into the C files directly.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260318-bond_uts-v2-1-033fe0d4e903@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
79cfb2d1 eb241585

+8 -31
+2 -4
drivers/net/bonding/bond_main.c
··· 93 93 #include <net/netdev_lock.h> 94 94 #include <net/xdp.h> 95 95 96 - #include "bonding_priv.h" 97 - 98 96 /*---------------------------- Module parameters ----------------------------*/ 99 97 100 98 /* monitor all links that often (in milliseconds). <=0 disables monitoring */ ··· 5874 5876 static void bond_ethtool_get_drvinfo(struct net_device *bond_dev, 5875 5877 struct ethtool_drvinfo *drvinfo) 5876 5878 { 5877 - strscpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver)); 5879 + strscpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver)); 5878 5880 snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d", 5879 5881 BOND_ABI_VERSION); 5880 5882 } ··· 6654 6656 module_init(bonding_init); 6655 6657 module_exit(bonding_exit); 6656 6658 MODULE_LICENSE("GPL"); 6657 - MODULE_DESCRIPTION(DRV_DESCRIPTION); 6659 + MODULE_DESCRIPTION("Ethernet Channel Bonding Driver"); 6658 6660 MODULE_AUTHOR("Thomas Davis, tadavis@lbl.gov and many others"); 6659 6661 MODULE_IMPORT_NS("NETDEV_INTERNAL");
+6 -5
drivers/net/bonding/bond_procfs.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include <generated/utsrelease.h> 2 3 #include <linux/proc_fs.h> 3 4 #include <linux/ethtool.h> 4 5 #include <linux/export.h> ··· 7 6 #include <net/netns/generic.h> 8 7 #include <net/bonding.h> 9 8 10 - #include "bonding_priv.h" 9 + #define bond_version "Ethernet Channel Bonding Driver: v" UTS_RELEASE "\n" 11 10 12 11 static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos) 13 12 __acquires(RCU) ··· 291 290 bn->proc_dir, &bond_info_seq_ops, bond); 292 291 if (bond->proc_entry == NULL) 293 292 netdev_warn(bond_dev, "Cannot create /proc/net/%s/%s\n", 294 - DRV_NAME, bond_dev->name); 293 + KBUILD_MODNAME, bond_dev->name); 295 294 else 296 295 memcpy(bond->proc_file_name, bond_dev->name, IFNAMSIZ); 297 296 } ··· 315 314 void __net_init bond_create_proc_dir(struct bond_net *bn) 316 315 { 317 316 if (!bn->proc_dir) { 318 - bn->proc_dir = proc_mkdir(DRV_NAME, bn->net->proc_net); 317 + bn->proc_dir = proc_mkdir(KBUILD_MODNAME, bn->net->proc_net); 319 318 if (!bn->proc_dir) 320 319 pr_warn("Warning: Cannot create /proc/net/%s\n", 321 - DRV_NAME); 320 + KBUILD_MODNAME); 322 321 } 323 322 } 324 323 ··· 327 326 void __net_exit bond_destroy_proc_dir(struct bond_net *bn) 328 327 { 329 328 if (bn->proc_dir) { 330 - remove_proc_entry(DRV_NAME, bn->net->proc_net); 329 + remove_proc_entry(KBUILD_MODNAME, bn->net->proc_net); 331 330 bn->proc_dir = NULL; 332 331 } 333 332 }
-22
drivers/net/bonding/bonding_priv.h
··· 1 - /* SPDX-License-Identifier: GPL-1.0+ */ 2 - /* 3 - * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'. 4 - * 5 - * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes 6 - * NCM: Network and Communications Management, Inc. 7 - * 8 - * BUT, I'm the one who modified it for ethernet, so: 9 - * (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov 10 - * 11 - */ 12 - 13 - #ifndef _BONDING_PRIV_H 14 - #define _BONDING_PRIV_H 15 - #include <generated/utsrelease.h> 16 - 17 - #define DRV_NAME "bonding" 18 - #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" 19 - 20 - #define bond_version DRV_DESCRIPTION ": v" UTS_RELEASE "\n" 21 - 22 - #endif