public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: move utsrelease.h include out of bonding_priv.h
@ 2026-03-16 12:17 Breno Leitao
  2026-03-18  1:37 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2026-03-16 12:17 UTC (permalink / raw)
  To: Jay Vosburgh, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, kernel-team, Breno Leitao

bonding_priv.h includes <generated/utsrelease.h> only to define
bond_version, which is used solely in bond_procfs.c. This causes every
file that includes bonding_priv.h to be recompiled whenever the kernel
version string changes (bond_main.c specifically). With
CONFIG_LOCALVERSION_AUTO=y, utsrelease.h is regenerated on every git
commit, so any git operation (revert, cherry-pick, bissect etc.)
triggers unnecessary recompilation of bond_main.

Move the include and the bond_version definition to bond_procfs.c,
which is the only consumer. This is consistent with how other drivers
use UTS_RELEASE (ixgbe, ice, i40e, ionic, nvme/target, DRM drivers,
firmware_loader, etc.), all of which include utsrelease.h directly in
the .c file that needs it rather than in a shared header.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/bonding/bond_procfs.c  | 3 +++
 drivers/net/bonding/bonding_priv.h | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 7edf72ec816ab..6abe8916202dc 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -6,8 +6,11 @@
 #include <net/netns/generic.h>
 #include <net/bonding.h>
 
+#include <generated/utsrelease.h>
 #include "bonding_priv.h"
 
+#define bond_version DRV_DESCRIPTION ": v" UTS_RELEASE "\n"
+
 static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
 	__acquires(RCU)
 {
diff --git a/drivers/net/bonding/bonding_priv.h b/drivers/net/bonding/bonding_priv.h
index fef6288c6944f..f9b327b6a494a 100644
--- a/drivers/net/bonding/bonding_priv.h
+++ b/drivers/net/bonding/bonding_priv.h
@@ -12,11 +12,7 @@
 
 #ifndef _BONDING_PRIV_H
 #define _BONDING_PRIV_H
-#include <generated/utsrelease.h>
-
 #define DRV_NAME	"bonding"
 #define DRV_DESCRIPTION	"Ethernet Channel Bonding Driver"
 
-#define bond_version DRV_DESCRIPTION ": v" UTS_RELEASE "\n"
-
 #endif

---
base-commit: 5446b8691eb8278f10deca92048fad84ffd1e4d5
change-id: 20260316-bond_uts-077fed8dce56

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-18  1:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 12:17 [PATCH net-next] bonding: move utsrelease.h include out of bonding_priv.h Breno Leitao
2026-03-18  1:37 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox