Re: [PATCH net-next 01/15] batman-adv: drop batman-adv specific version
Jakub Kicinski <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 29 May 2026 21:23:21 +0200 Sven Eckelmann wrote: > On Friday, 29 May 2026 20:24:30 CEST Jakub Kicinski wrote: > [...] > > > > > > version.c and version.h are there to not recompile more parts of batman-adv > > > than necessary when the linux kernel version changes. Has nothing to do > > > with OOT. If you consider this a no-go, I can also just place > > > generated/utsrelease.h + UTS_RELEASE in the three different files. > > > > Ah! My bad, sorry for the accusation! 🙂 > > > > The re-compilation thing is annoying but it's solvable. > > Please TAL at commit 3f9ed5f5aa9ecffd2 for inspiration. > > Interesting, didn't knew about it. This should work for the in-function ones > and avoids the const batadv_version string + version.h. > > https://git.open-mesh.org/batadv.git/commit/?id=6f864eb5cfd8315b8f9a29167263282fe4593f3a > > > Now we are left with version.c. MODULE_VERSION doesn't accept "dynamically > generated" strings for obvious reasons. Which could be handled via: > > * MODULE_VERSION(UTS_RELEASE) in version.c (keeping it in a separate file) > * MODULE_VERSION(UTS_RELEASE) in main.c (requires recompilation of main.c) > * MODULE_VERSION($STATIC_STRING) in main.c (then somebody needs to come up > with one) > * something else > > What would you prefer? No strong preference, I'd probably go with option 2 since it seems the simplest. But option 1 seems okay, too, if you prefer that.