[PATCH RFC batadv v2] batman-adv: drop batman-adv specific version for in-tree module

Sven Eckelmann <[email protected]>
Newsgroups org.open-mesh.lists.batman
Message-ID <20260516-no-upstream-version-bumps-v2-1-c8a6bf1e3e23@narfation.org>
Bumping the version number on the first pull request after each merge
window was deemed inappropriate for an in-tree component. The version
number carries little meaningful information in the context of the Linux
kernel release model, where stable and distribution might all carry
slightly different patches (without any change to the batman-adv version).

Instead, expose a UTS_RELEASE-based string to consumers of the netlink
and ethtool interfaces.

The out-of-tree batman-adv package is unaffected by this change.

Link: https://lore.kernel.org/r/20210203163302.13e8a2a7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com
Link: https://lore.kernel.org/r/YnfjtpuAaH+Zkf9S@unreal
Link: https://lore.kernel.org/r/Y9faTA0rNSXg%2FsLD@nanopsycho
Signed-off-by: Sven Eckelmann <[email protected]>
---
Changes in v2:
- commit message: UTS_RELASE not UTC_RELEASE
- drop the MODULE_VERSION part because batctl was not actually ready to
  work without it (seems I never prepaqred the changes when we were talking
  about it many years)
- Link to v1: https://patch.msgid.link/20260515-no-upstream-version-bumps-v1-1-6aa349f8e949@narfation.org
---
 net/batman-adv/main.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 465d26d8..7f722425 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -7,15 +7,24 @@
 #ifndef _NET_BATMAN_ADV_MAIN_H_
 #define _NET_BATMAN_ADV_MAIN_H_
 
+#include <generated/utsrelease.h>
+
 #define BATADV_DRIVER_AUTHOR "Marek Lindner <[email protected]>, " \
 			     "Simon Wunderlich <[email protected]>"
 #define BATADV_DRIVER_DESC   "B.A.T.M.A.N. advanced"
 #define BATADV_DRIVER_DEVICE "batman-adv"
 
+#ifdef CONFIG_BATMAN_ADV_IN_TREE // UGLY_HACK_NEW
+#define BATADV_SOURCE_VERSION "linux-" UTS_RELEASE
+#else // UGLY_HACK_OLD
+
+/* prefer version provided by Makefile */
 #ifndef BATADV_SOURCE_VERSION
 #define BATADV_SOURCE_VERSION "2026.2"
 #endif
 
+#endif // UGLY_HACK_STOP
+
 /* B.A.T.M.A.N. parameters */
 
 #define BATADV_TQ_MAX_VALUE 255

---
base-commit: 7700c90cbd12d04b8aabb62fe031ce6b31d6a4d9
change-id: 20260515-no-upstream-version-bumps-ea213a18051a

Best regards,
--  
Sven Eckelmann <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.