public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 kernel-team@meta.com, Breno Leitao <leitao@debian.org>
Subject: [PATCH net-next] bonding: move utsrelease.h include out of bonding_priv.h
Date: Mon, 16 Mar 2026 05:17:45 -0700	[thread overview]
Message-ID: <20260316-bond_uts-v1-1-428696ea79d5@debian.org> (raw)

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>


             reply	other threads:[~2026-03-16 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 12:17 Breno Leitao [this message]
2026-03-18  1:37 ` [PATCH net-next] bonding: move utsrelease.h include out of bonding_priv.h Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260316-bond_uts-v1-1-428696ea79d5@debian.org \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jv@jvosburgh.net \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox