Re: Dealing with SUBLEVEL overflow in backports

Johannes Berg <[email protected]> Tue, 08 Feb 2022 08:58:36 +0100
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
On Mon, 2022-02-07 at 23:18 +0100, Hauke Mehrtens wrote:
> 
> The LINUX_VERSION_CODE is fixed since 4.9.255, see here:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=42efb098c75f9d4b95f7cf35d3d52e80cc2fde82
> 
> SUBLEVEL should still contains the minor kernel version number.
> 
> We could extend the macros in backport/backport-include/linux/version.h 
> to check for SUBLEVEL manually if it overflows.
> 

Right, but the thing is we don't have SUBLEVEL in the *C* code, only in
the Makefile.

However, stupid me? This is trivial:

--- a/Makefile.kernel
+++ b/Makefile.kernel
@@ -60,3 +60,5 @@ obj-$(CPTCFG_WLAN) += drivers/net/wireless/
 #obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/
 #
 #obj-$(CPTCFG_STAGING) += drivers/staging/
+
+subdir-ccflags-y += -DCOMPAT_KERNEL_SUBLEVEL=$(SUBLEVEL)


(whatever the name is)

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in