Index: trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c	(revision 83471)
+++ trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c	(revision 85698)
@@ -48,11 +48,11 @@
 # include <linux/intel-iommu.h>
 # include <linux/pci.h>
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) && \
-     (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 41) || LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
+# if RTLNX_VER_MAX(3,1,0) && \
+     (RTLNX_VER_MAX(2,6,41) || RTLNX_VER_MIN(3,0,0))
 #  include <asm/amd_iommu.h>
 # else
 #  include <linux/amd-iommu.h>
 # endif
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+# if RTLNX_VER_MAX(3,2,0)
 #  define IOMMU_PRESENT()      iommu_found()
 #  define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc()
@@ -87,8 +87,8 @@
 
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
+#if RTLNX_VER_MIN(2,6,20)
 # define PCI_DEV_GET(v,d,p)            pci_get_device(v,d,p)
 # define PCI_DEV_PUT(x)                pci_dev_put(x)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
+#if RTLNX_VER_MIN(4,17,0)
 /* assume the domain number to be zero - exactly the same assumption of
  * pci_get_bus_and_slot()
@@ -165,5 +165,5 @@
     if (request_module(PCI_STUB_MODULE) == 0)
     {
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
+# if RTLNX_VER_MIN(2,6,30)
         /* find_module() is static before Linux 2.6.30 */
         mutex_lock(&module_mutex);
@@ -320,5 +320,5 @@
     if (RT_LIKELY(pIns->pPciDev))
     {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28)
+#if RTLNX_VER_MIN(2,6,28)
         if (pci_reset_function(pIns->pPciDev))
         {
@@ -374,5 +374,5 @@
     fs_save = get_fs();
     set_fs(KERNEL_DS);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#if RTLNX_VER_MIN(4,14,0)
     ret = kernel_write(file, data, size, &offset);
 #else
@@ -448,5 +448,5 @@
         int                iCmdLen;
         const int          cMaxBuf = 128;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         const struct cred *pOldCreds;
         struct cred       *pNewCreds;
@@ -469,10 +469,10 @@
 
         /* Somewhat ugly hack - override current credentials */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         pNewCreds = prepare_creds();
         if (!pNewCreds)
                 goto done;
 
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+# if RTLNX_VER_MIN(3,5,0)
         pNewCreds->fsuid = GLOBAL_ROOT_UID;
 # else
@@ -533,5 +533,5 @@
             printk(KERN_DEBUG "vboxpci: cannot open %s\n", szFileBuf);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         revert_creds(pOldCreds);
         put_cred(pNewCreds);
@@ -560,5 +560,5 @@
         int                iCmdLen;
         const int          cMaxBuf = 128;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         const struct cred *pOldCreds;
         struct cred       *pNewCreds;
@@ -586,10 +586,10 @@
 
         /* Somewhat ugly hack - override current credentials */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         pNewCreds = prepare_creds();
         if (!pNewCreds)
             goto done;
 
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+# if RTLNX_VER_MIN(3,5,0)
         pNewCreds->fsuid = GLOBAL_ROOT_UID;
 # else
@@ -627,5 +627,5 @@
             printk(KERN_DEBUG "vboxpci: cannot open %s\n", szFileBuf);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+#if RTLNX_VER_MIN(2,6,29)
         revert_creds(pOldCreds);
         put_cred(pNewCreds);
@@ -670,5 +670,5 @@
                 vbpci_printk(KERN_DEBUG, pPciDev, "%s\n", __func__);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 1)
+#if RTLNX_VER_MIN(2,6,1)
                 if (pci_enable_msi(pPciDev) == 0)
                     pIns->fMsiUsed = true;
@@ -717,5 +717,5 @@
         vboxPciLinuxDevUnregisterWithIommu(pIns);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 1)
+#if RTLNX_VER_MIN(2,6,1)
         if (pIns->fMsiUsed)
             pci_disable_msi(pPciDev);
@@ -843,5 +843,5 @@
         if (!rcLnx)
         {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+#if RTLNX_VER_MIN(2,6,25)
             /*
              * ioremap() defaults to no caching since the 2.6 kernels.
@@ -859,5 +859,5 @@
             else
             {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+#if RTLNX_VER_MIN(2,6,25)
                 vbpci_printk(KERN_DEBUG, pPciDev, "ioremap() failed\n");
 #else
@@ -956,5 +956,5 @@
  * @param   pRegs           Register set. Removed in 2.6.19.
  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && !defined(DOXYGEN_RUNNING)
+#if RTLNX_VER_MIN(2,6,19) && !defined(DOXYGEN_RUNNING)
 static irqreturn_t vboxPciOsIrqHandler(int iIrq, void *pvDevId)
 #else
@@ -992,5 +992,5 @@
 #ifdef VBOX_WITH_SHARED_PCI_INTERRUPTS
                      /* Allow interrupts sharing. */
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
+# if RTLNX_VER_MIN(2,6,20)
                      IRQF_SHARED,
 # else
@@ -1002,5 +1002,5 @@
                      /* We don't allow interrupts sharing */
                      /* XXX overhaul */
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
+# if RTLNX_VER_MIN(2,6,20) && RTLNX_VER_MAX(4,1,0)
                      IRQF_DISABLED, /* keep irqs disabled when calling the action handler */
 # else
