summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-02-07 23:04:11 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-02-09 14:52:26 +0100
commite13e44d9a81da4bf77d9869db5b4764fc0811d9f (patch)
treec610ae2b0f634df75fe88f65a047e5c741c9b0af /patches
parent46939c43903da6b202c95a0fcb24acce55fd63c0 (diff)
backports: always use new version compare macros
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/0001-group-attr/0001-group_attr_class.cocci4
-rw-r--r--patches/0001-group-attr/0002-group_attr_bus.cocci4
-rw-r--r--patches/0001-group-attr/0003-class_groups.cocci4
-rw-r--r--patches/0001-v4l2-dma_mmap_coherent-revert.patch8
-rw-r--r--patches/0002-disable-dump-adjust-on-old-kernels.patch2
-rw-r--r--patches/0002-gpio-parent.cocci8
-rw-r--r--patches/0006-ieee802154-6lowpan-namespace.patch12
-rw-r--r--patches/0007-lowpan-inet_frag_lru_move.patch8
-rw-r--r--patches/0008-net-user-ns.patch4
-rw-r--r--patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch2
-rw-r--r--patches/0014-netlink_seq/net_wireless_nl80211.patch2
-rw-r--r--patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch2
-rw-r--r--patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch2
-rw-r--r--patches/0017-get_ts_info/get_ts_info.cocci8
-rw-r--r--patches/0019-usb_driver_lpm.cocci2
-rw-r--r--patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch8
-rw-r--r--patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch2
-rw-r--r--patches/0021-umode_t-api-change/ath10k.patch2
-rw-r--r--patches/0021-umode_t-api-change/ath9k.patch2
-rw-r--r--patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch2
-rw-r--r--patches/0022-define-tracing/ath6kl.patch2
-rw-r--r--patches/0022-define-tracing/cfg80211.patch2
-rw-r--r--patches/0022-define-tracing/mt7601u.patch2
-rw-r--r--patches/0022-define-tracing/wil6210.patch2
-rw-r--r--patches/0024-led-blink-api/mac80211.patch4
-rw-r--r--patches/0025-usb-sg/usbnet.patch10
-rw-r--r--patches/0026-ipv6_stub/cdc_mbim.patch8
-rw-r--r--patches/0028-select_queue/mac80211.patch8
-rw-r--r--patches/0028-select_queue/mwifiex.patch4
-rw-r--r--patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch4
-rw-r--r--patches/0030-qdisc_tx_busylock/bluetooth.patch4
-rw-r--r--patches/0030-qdisc_tx_busylock/ieee802154.patch4
-rw-r--r--patches/0031-sk_data_ready.cocci8
-rw-r--r--patches/0032-sriov_configure/igb_sriov_configure.patch4
-rw-r--r--patches/0032-sriov_configure/sriov_configure.cocci8
-rw-r--r--patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch20
-rw-r--r--patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch32
-rw-r--r--patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci12
-rw-r--r--patches/0035-skb_no_fcs/skb_no_fcs.cocci4
-rw-r--r--patches/0036-ethtool_eee/ethtool_eee.cocci16
-rw-r--r--patches/0037-ethtool_get_module/get_module.cocci16
-rw-r--r--patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch26
-rw-r--r--patches/0039-ethtool_rxnfc/rxnfc.cocci4
-rw-r--r--patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci8
-rw-r--r--patches/0042-pci_error_handlers/atl1e.patch4
-rw-r--r--patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci4
-rw-r--r--patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch4
-rw-r--r--patches/0043-ndo_set_vf_rate/set_vf_rate.cocci12
-rw-r--r--patches/0044-no_user_ns_in_net/ieee802154.patch4
-rw-r--r--patches/0047-write_iter/bluetooth.patch10
-rw-r--r--patches/0049-no-pfmemalloc/no-pfmemalloc.cocci4
-rw-r--r--patches/0050-iov_iter/bluetooth.patch28
-rw-r--r--patches/0051-no-wakeup_path/ssb.patch4
-rw-r--r--patches/0052-deactivate-ptp-pin/igb.patch18
-rw-r--r--patches/0053-remove_wait_on_bit_timeout/btusb.patch8
-rw-r--r--patches/0053-remove_wait_on_bit_timeout/hci_intel.patch14
-rw-r--r--patches/0054-struct-proto_ops-sig.cocci36
-rw-r--r--patches/0055-name_assign_type/brcmfmac.patch2
-rw-r--r--patches/0056-ndo_features_check/features_check.cocci8
-rw-r--r--patches/0058-ptp_getsettime64/ptp_getsettime64.cocci12
-rw-r--r--patches/0059-skb_xmit_more/skb_no_xmit_more.cocci4
-rw-r--r--patches/0059-uuid-in-mei/nfc.patch8
-rw-r--r--patches/0060-trace_field_struct/mt7601u.patch4
-rw-r--r--patches/0061-termios_rwsem/nfc.patch8
-rw-r--r--patches/0062-acpi-gpio-remove/hci_bcm.patch14
-rw-r--r--patches/0062-acpi-gpio-remove/hci_intel.patch12
-rw-r--r--patches/0062-iff-no-queue.cocci2
-rw-r--r--patches/0065-ndisc_send_na-argument.cocci2
-rw-r--r--patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch2
-rw-r--r--patches/0068-proto-hash/ieee802154.patch10
-rw-r--r--patches/0069-iwlwifi-pd-string-fix.patch10
-rw-r--r--patches/0069-remove-of_irq/bcma.patch2
-rw-r--r--patches/0070-mac80211-fils.patch6
-rw-r--r--patches/0071-skb-head_frag/wireless.patch2
-rw-r--r--patches/0072-netdevice-ndo_fdb_add/igb.patch2
-rw-r--r--patches/0073-netdevice-mtu-range.cocci4
-rw-r--r--patches/0074-netdevice-mtu-range-ifdefs.cocci4
-rw-r--r--patches/0074-skb-wifi-acked.cocci2
-rw-r--r--patches/0075-ndo-stats-64.cocci4
-rw-r--r--patches/crypto-ccm.patch2
-rw-r--r--patches/devcoredump.patch12
-rw-r--r--patches/flow_dissector.patch2
82 files changed, 295 insertions, 295 deletions
diff --git a/patches/0001-group-attr/0001-group_attr_class.cocci b/patches/0001-group-attr/0001-group_attr_class.cocci
index a9c84651..b08cb3cd 100644
--- a/patches/0001-group-attr/0001-group_attr_class.cocci
+++ b/patches/0001-group-attr/0001-group_attr_class.cocci
@@ -46,7 +46,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs";
@@
struct class group_class = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_GEQ(3,11,0)
.dev_groups = groups,
+#else
+ .dev_attrs = group_dev_attr,
@@ -58,7 +58,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT;
identifier attribute_group.group;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_GEQ(3,11,0)
ATTRIBUTE_GROUPS(group);
+#else
+#define BP_ATTR_GRP_STRUCT device_attribute
diff --git a/patches/0001-group-attr/0002-group_attr_bus.cocci b/patches/0001-group-attr/0002-group_attr_bus.cocci
index c19e9d7f..5d75144d 100644
--- a/patches/0001-group-attr/0002-group_attr_bus.cocci
+++ b/patches/0001-group-attr/0002-group_attr_bus.cocci
@@ -44,7 +44,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs";
@@
struct bus_type group_bus = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
.dev_groups = groups,
+#else
+ .dev_attrs = group_dev_attr,
@@ -56,7 +56,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT;
identifier attribute_group.group;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
ATTRIBUTE_GROUPS(group);
+#else
+#define BP_ATTR_GRP_STRUCT device_attribute
diff --git a/patches/0001-group-attr/0003-class_groups.cocci b/patches/0001-group-attr/0003-class_groups.cocci
index a4694dd7..781f6c2b 100644
--- a/patches/0001-group-attr/0003-class_groups.cocci
+++ b/patches/0001-group-attr/0003-class_groups.cocci
@@ -20,7 +20,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs";
@@
struct class group_class = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_GEQ(4,10,0)
.class_groups = groups,
+#else
+ .class_attrs = group_dev_attr,
@@ -32,7 +32,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT;
identifier attribute_group.group;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_GEQ(4,10,0)
ATTRIBUTE_GROUPS(group);
+#else
+#define BP_ATTR_GRP_STRUCT class_attribute
diff --git a/patches/0001-v4l2-dma_mmap_coherent-revert.patch b/patches/0001-v4l2-dma_mmap_coherent-revert.patch
index 352a5422..85c1bb01 100644
--- a/patches/0001-v4l2-dma_mmap_coherent-revert.patch
+++ b/patches/0001-v4l2-dma_mmap_coherent-revert.patch
@@ -29,8 +29,8 @@ Date: Thu Jun 14 11:32:21 2012 -0300
return buf;
}
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0))
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
++#if LINUX_VERSION_IS_LESS(3,9,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
+static int
+backport_vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr,
+ unsigned long size,
@@ -73,7 +73,7 @@ Date: Thu Jun 14 11:32:21 2012 -0300
+ return backport_vb2_mmap_pfn_range(vma, buf->dma_addr, buf->size,
+ &vb2_common_vm_ops, &buf->handler);
+}
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
+#else
static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
{
@@ -82,7 +82,7 @@ Date: Thu Jun 14 11:32:21 2012 -0300
return 0;
}
-+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) */
++#endif /* LINUX_VERSION_IS_LESS(3,9,0) */
/*********************************************/
/* DMABUF ops for exporters */
diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch
index 64e4f91f..4b9fdcd3 100644
--- a/patches/0002-disable-dump-adjust-on-old-kernels.patch
+++ b/patches/0002-disable-dump-adjust-on-old-kernels.patch
@@ -32,7 +32,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100
cb->nlh->nlmsg_seq,
NLM_F_MULTI, state);
if (ret < 0) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
++#if LINUX_VERSION_IS_GEQ(3,1,0)
/*
* If sending the wiphy data didn't fit (ENOBUFS
* or EMSGSIZE returned), this SKB is still
diff --git a/patches/0002-gpio-parent.cocci b/patches/0002-gpio-parent.cocci
index b266facc..fd953447 100644
--- a/patches/0002-gpio-parent.cocci
+++ b/patches/0002-gpio-parent.cocci
@@ -9,17 +9,17 @@
struct gpio_chip *chip;
expression E1;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)
++#if LINUX_VERSION_IS_GEQ(4,5,0)
chip->parent = E1;
+#else
+chip->dev = E1;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */
@r2@
struct gpio_chip chip;
expression E2;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)
++#if LINUX_VERSION_IS_GEQ(4,5,0)
chip.parent = E2;
+#else
+chip.dev = E2;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */
diff --git a/patches/0006-ieee802154-6lowpan-namespace.patch b/patches/0006-ieee802154-6lowpan-namespace.patch
index 7e1fef30..2412a450 100644
--- a/patches/0006-ieee802154-6lowpan-namespace.patch
+++ b/patches/0006-ieee802154-6lowpan-namespace.patch
@@ -8,7 +8,7 @@ idea yet.
struct net *net;
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags);
+#else
+ net = &init_net;
@@ -20,7 +20,7 @@ idea yet.
static struct ctl_table lowpan_frags_ns_ctl_table[] = {
{
.procname = "6lowpanfrag_high_thresh",
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.data = &init_net.ieee802154_lowpan.frags.high_thresh,
+#else
+ .data = &ieee802154_lowpan.frags.high_thresh,
@@ -28,7 +28,7 @@ idea yet.
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.extra1 = &init_net.ieee802154_lowpan.frags.low_thresh
+#else
+ .extra1 = &ieee802154_lowpan.frags.low_thresh
@@ -36,7 +36,7 @@ idea yet.
},
{
.procname = "6lowpanfrag_low_thresh",
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.data = &init_net.ieee802154_lowpan.frags.low_thresh,
+#else
+ .data = &ieee802154_lowpan.frags.low_thresh,
@@ -45,7 +45,7 @@ idea yet.
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = &zero,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.extra2 = &init_net.ieee802154_lowpan.frags.high_thresh
+#else
+ .extra2 = &ieee802154_lowpan.frags.high_thresh
@@ -53,7 +53,7 @@ idea yet.
},
{
.procname = "6lowpanfrag_time",
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.data = &init_net.ieee802154_lowpan.frags.timeout,
+#else
+ .data = &ieee802154_lowpan.frags.timeout,
diff --git a/patches/0007-lowpan-inet_frag_lru_move.patch b/patches/0007-lowpan-inet_frag_lru_move.patch
index d0b2c67c..ef524148 100644
--- a/patches/0007-lowpan-inet_frag_lru_move.patch
+++ b/patches/0007-lowpan-inet_frag_lru_move.patch
@@ -8,7 +8,7 @@ and then domain specific inet_frag_lru_move() define.
fq->d_size = arg->d_size;
fq->saddr = *arg->src;
fq->daddr = *arg->dst;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++#if LINUX_VERSION_IS_LESS(3,9,0)
+ spin_lock_init(&fq->lru_lock);
+#endif
}
@@ -28,12 +28,12 @@ and then domain specific inet_frag_lru_move() define.
u16 d_size;
struct ieee802154_addr saddr;
struct ieee802154_addr daddr;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++#if LINUX_VERSION_IS_LESS(3,9,0)
+ spinlock_t lru_lock;
+#endif
};
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++#if LINUX_VERSION_IS_LESS(3,9,0)
+/*
+ * XXX: this is a *domain* specific inet_frag_lru_move backport,
+ * note the added lowpan_ prefix, this requires a respective patch
@@ -52,7 +52,7 @@ and then domain specific inet_frag_lru_move() define.
+ list_move_tail(&q->lru_list, &q->net->lru_list);
+ spin_unlock(&fq->lru_lock);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
++#endif /* LINUX_VERSION_IS_LESS(3,9,0) */
+
static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a)
{
diff --git a/patches/0008-net-user-ns.patch b/patches/0008-net-user-ns.patch
index f2a7e5dc..79605c05 100644
--- a/patches/0008-net-user-ns.patch
+++ b/patches/0008-net-user-ns.patch
@@ -7,11 +7,11 @@ via commit 038e7332b8.
table[1].extra2 = &ieee802154_lowpan->frags.high_thresh;
table[2].data = &ieee802154_lowpan->frags.timeout;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
/* Don't export sysctls to unprivileged users */
if (net->user_ns != &init_user_ns)
table[0].procname = NULL;
-+#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,8,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,8,0) */
}
hdr = register_net_sysctl(net, "net/ieee802154/6lowpan", table);
diff --git a/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch b/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
index b7447c59..acac79c9 100644
--- a/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
+++ b/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
@@ -4,7 +4,7 @@
else
size = sdio_align_size(self->func, size);
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0))
++#if LINUX_VERSION_IS_LESS(3, 2, 0)
+ /* A quirk to handle this was committed in 3.2-rc */
+ if (size == SDIO_BLOCK_SIZE)
+ size += SDIO_BLOCK_SIZE; /* HW bug; force use of block mode */
diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch
index d51f9110..5bab6282 100644
--- a/patches/0014-netlink_seq/net_wireless_nl80211.patch
+++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch
@@ -4,7 +4,7 @@
spin_lock_bh(&rdev->bss_lock);
cfg80211_bss_expire(rdev);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if LINUX_VERSION_IS_GEQ(3,1,0)
cb->seq = rdev->bss_generation;
+#endif
diff --git a/patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch b/patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch
index 922e1a03..d3dc0a0d 100644
--- a/patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch
+++ b/patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch
@@ -4,7 +4,7 @@
#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0))
++#if LINUX_VERSION_IS_LESS(3,2,0)
+static struct pm_qos_request_list ipw2100_pm_qos_req;
+#else
static struct pm_qos_request ipw2100_pm_qos_req;
diff --git a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch
index 10f5943c..6f3e4244 100644
--- a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch
+++ b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch
@@ -4,7 +4,7 @@
goto out;
}
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if LINUX_VERSION_IS_GEQ(3,1,0)
#ifdef CONFIG_OLPC
if (machine_is_olpc()) {
if (priv->wol_criteria == EHS_REMOVE_WAKEUP)
diff --git a/patches/0017-get_ts_info/get_ts_info.cocci b/patches/0017-get_ts_info/get_ts_info.cocci
index 3e023a32..43f4339f 100644
--- a/patches/0017-get_ts_info/get_ts_info.cocci
+++ b/patches/0017-get_ts_info/get_ts_info.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct ethtool_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
.get_ts_info = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
};
// ----------------------------------------------------------------------
@@ -14,6 +14,6 @@ struct ethtool_ops s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
diff --git a/patches/0019-usb_driver_lpm.cocci b/patches/0019-usb_driver_lpm.cocci
index 60712dce..793ca4e6 100644
--- a/patches/0019-usb_driver_lpm.cocci
+++ b/patches/0019-usb_driver_lpm.cocci
@@ -2,7 +2,7 @@
identifier backport_driver;
@@
struct usb_driver backport_driver = {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
++#if LINUX_VERSION_IS_GEQ(3,5,0)
.disable_hub_initiated_lpm = 1,
+#endif
...
diff --git a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch
index d1c6b64f..81371523 100644
--- a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch
+++ b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch
@@ -12,7 +12,7 @@
if (enable) {
/* Disable hardware flow control */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
++#if LINUX_VERSION_IS_GEQ(3,7,0)
ktermios = tty->termios;
+#else
+ ktermios = *tty->termios;
@@ -24,7 +24,7 @@
BT_DBG("Setting RTS: %s", status ? "failed" : "success");
/* Re-enable hardware flow control */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
++#if LINUX_VERSION_IS_GEQ(3,7,0)
ktermios = tty->termios;
+#else
+ ktermios = *tty->termios;
@@ -36,7 +36,7 @@
struct ktermios ktermios;
/* Bring the UART into a known 8 bits no parity hw fc state */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
++#if LINUX_VERSION_IS_GEQ(3,7,0)
ktermios = tty->termios;
+#else
+ ktermios = *tty->termios;
@@ -48,7 +48,7 @@
struct tty_struct *tty = hu->tty;
struct ktermios ktermios;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
++#if LINUX_VERSION_IS_GEQ(3,7,0)
ktermios = tty->termios;
+#else
+ ktermios = *tty->termios;
diff --git a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch
index 780d0b97..71aa75dd 100644
--- a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch
+++ b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch
@@ -4,7 +4,7 @@
static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
{
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
++#if LINUX_VERSION_IS_GEQ(3,7,0)
struct ktermios *new = &tty->termios;
+#else
+ struct ktermios *new = tty->termios;
diff --git a/patches/0021-umode_t-api-change/ath10k.patch b/patches/0021-umode_t-api-change/ath10k.patch
index 0d02657a..b72c9297 100644
--- a/patches/0021-umode_t-api-change/ath10k.patch
+++ b/patches/0021-umode_t-api-change/ath10k.patch
@@ -4,7 +4,7 @@
static struct dentry *create_buf_file_handler(const char *filename,
struct dentry *parent,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
++#if LINUX_VERSION_IS_GEQ(3,3,0)
umode_t mode,
+#else
+ int mode,
diff --git a/patches/0021-umode_t-api-change/ath9k.patch b/patches/0021-umode_t-api-change/ath9k.patch
index 401bf196..a2ac14f3 100644
--- a/patches/0021-umode_t-api-change/ath9k.patch
+++ b/patches/0021-umode_t-api-change/ath9k.patch
@@ -4,7 +4,7 @@
static struct dentry *create_buf_file_handler(const char *filename,
struct dentry *parent,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
++#if LINUX_VERSION_IS_GEQ(3,3,0)
umode_t mode,
+#else
+ int mode,
diff --git a/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch b/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch
index 7f85a49b..a64c0290 100644
--- a/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch
+++ b/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch
@@ -4,7 +4,7 @@
static struct dentry *create_buf_file_handler(const char *filename,
struct dentry *parent,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
++#if LINUX_VERSION_IS_GEQ(3,3,0)
umode_t mode,
+#else
+ int mode,
diff --git a/patches/0022-define-tracing/ath6kl.patch b/patches/0022-define-tracing/ath6kl.patch
index bdf455aa..d0bf8944 100644
--- a/patches/0022-define-tracing/ath6kl.patch
+++ b/patches/0022-define-tracing/ath6kl.patch
@@ -4,7 +4,7 @@
*/
#include <linux/module.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#if LINUX_VERSION_IS_LESS(3,1,0)
+#include <linux/interrupt.h>
+#endif
diff --git a/patches/0022-define-tracing/cfg80211.patch b/patches/0022-define-tracing/cfg80211.patch
index 95a0d6a8..e2b57a8c 100644
--- a/patches/0022-define-tracing/cfg80211.patch
+++ b/patches/0022-define-tracing/cfg80211.patch
@@ -2,7 +2,7 @@
+++ b/net/wireless/trace.c
@@ -1,4 +1,7 @@
#include <linux/module.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#if LINUX_VERSION_IS_LESS(3,1,0)
+#include <linux/interrupt.h>
+#endif
diff --git a/patches/0022-define-tracing/mt7601u.patch b/patches/0022-define-tracing/mt7601u.patch
index ea7bc809..1682a763 100644
--- a/patches/0022-define-tracing/mt7601u.patch
+++ b/patches/0022-define-tracing/mt7601u.patch
@@ -4,7 +4,7 @@
*/
#include <linux/module.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
++#if LINUX_VERSION_IS_LESS(3,4,0)
+#include <linux/interrupt.h>
+#endif
diff --git a/patches/0022-define-tracing/wil6210.patch b/patches/0022-define-tracing/wil6210.patch
index 5f4b43b9..2e51beb1 100644
--- a/patches/0022-define-tracing/wil6210.patch
+++ b/patches/0022-define-tracing/wil6210.patch
@@ -4,7 +4,7 @@
*/
#include <linux/module.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#if LINUX_VERSION_IS_LESS(3,1,0)
+#include <linux/interrupt.h>
+#endif
diff --git a/patches/0024-led-blink-api/mac80211.patch b/patches/0024-led-blink-api/mac80211.patch
index 46b919b5..dcf151e0 100644
--- a/patches/0024-led-blink-api/mac80211.patch
+++ b/patches/0024-led-blink-api/mac80211.patch
@@ -19,7 +19,7 @@
if (!atomic_read(&local->rx_led_active))
return;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
led_trigger_blink_oneshot(&local->rx_led, &led_delay, &led_delay, 0);
+#else
+ if (local->rx_led_counter++ % 2 == 0)
@@ -38,7 +38,7 @@
if (!atomic_read(&local->tx_led_active))
return;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
led_trigger_blink_oneshot(&local->tx_led, &led_delay, &led_delay, 0);
+#else
+ if (local->tx_led_counter++ % 2 == 0)
diff --git a/patches/0025-usb-sg/usbnet.patch b/patches/0025-usb-sg/usbnet.patch
index e9c204d9..1a1017c3 100644
--- a/patches/0025-usb-sg/usbnet.patch
+++ b/patches/0025-usb-sg/usbnet.patch
@@ -4,7 +4,7 @@
/*-------------------------------------------------------------------------*/
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,35,0)
++#if LINUX_VERSION_IS_GEQ(3,35,0)
static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
{
unsigned num_sgs, total_len = 0;
@@ -25,7 +25,7 @@
if (!(info->flags & FLAG_SEND_ZLP)) {
if (!(info->flags & FLAG_MULTI_PACKET)) {
length++;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,35,0)
++#if LINUX_VERSION_IS_GEQ(3,35,0)
if (skb_tailroom(skb) && !urb->num_sgs) {
skb->data[skb->len] = 0;
__skb_put(skb, 1);
@@ -45,7 +45,7 @@
if (skb)
dev_kfree_skb_any (skb);
if (urb) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,35,0)
++#if LINUX_VERSION_IS_GEQ(3,35,0)
kfree(urb->sg);
+#endif
usb_free_urb(urb);
@@ -55,7 +55,7 @@
rx_process (dev, skb);
continue;
case tx_done:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,35,0)
++#if LINUX_VERSION_IS_GEQ(3,35,0)
kfree(entry->urb->sg);
+#endif
case rx_cleanup:
@@ -65,7 +65,7 @@
retval = usb_submit_urb(res, GFP_ATOMIC);
if (retval < 0) {
dev_kfree_skb_any(skb);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,35,0)
++#if LINUX_VERSION_IS_GEQ(3,35,0)
kfree(res->sg);
+#endif
usb_free_urb(res);
diff --git a/patches/0026-ipv6_stub/cdc_mbim.patch b/patches/0026-ipv6_stub/cdc_mbim.patch
index bece5b08..f75d64ca 100644
--- a/patches/0026-ipv6_stub/cdc_mbim.patch
+++ b/patches/0026-ipv6_stub/cdc_mbim.patch
@@ -4,7 +4,7 @@
return NULL;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
/* Some devices are known to send Neigbor Solicitation messages and
* require Neigbor Advertisement replies. The IPv6 core will not
* respond since IFF_NOARP is set, so we must handle them ourselves.
@@ -12,7 +12,7 @@
msg->icmph.icmp6_code == 0 &&
msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION);
}
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,12,0) */
static struct sk_buff *cdc_mbim_process_dgram(struct usbnet *dev, u8 *buf, size_t len, u16 tci)
@@ -20,10 +20,10 @@
proto = htons(ETH_P_IP);
break;
case 0x60:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
if (is_neigh_solicit(buf, len))
do_neigh_solicit(dev, buf, tci);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,12,0) */
proto = htons(ETH_P_IPV6);
break;
default:
diff --git a/patches/0028-select_queue/mac80211.patch b/patches/0028-select_queue/mac80211.patch
index 39a9d4aa..cc8b300e 100644
--- a/patches/0028-select_queue/mac80211.patch
+++ b/patches/0028-select_queue/mac80211.patch
@@ -4,13 +4,13 @@
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++#if LINUX_VERSION_IS_GEQ(3,14,0) || \
+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
static u16 ieee80211_netdev_select_queue(struct net_device *dev,
struct sk_buff *skb,
void *accel_priv,
select_queue_fallback_t fallback)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#elif LINUX_VERSION_IS_GEQ(3,13,0)
+static u16 ieee80211_netdev_select_queue(struct net_device *dev,
+ struct sk_buff *skb,
+ void *accel_priv)
@@ -25,13 +25,13 @@
.ndo_get_stats64 = ieee80211_get_stats64,
};
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++#if LINUX_VERSION_IS_GEQ(3,14,0) || \
+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
static u16 ieee80211_monitor_select_queue(struct net_device *dev,
struct sk_buff *skb,
void *accel_priv,
select_queue_fallback_t fallback)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#elif LINUX_VERSION_IS_GEQ(3,13,0)
+static u16 ieee80211_monitor_select_queue(struct net_device *dev,
+ struct sk_buff *skb,
+ void *accel_priv)
diff --git a/patches/0028-select_queue/mwifiex.patch b/patches/0028-select_queue/mwifiex.patch
index 61a091b5..17aeb912 100644
--- a/patches/0028-select_queue/mwifiex.patch
+++ b/patches/0028-select_queue/mwifiex.patch
@@ -4,12 +4,12 @@
return &priv->stats;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++#if LINUX_VERSION_IS_GEQ(3,14,0) || \
+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
static u16
mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
void *accel_priv, select_queue_fallback_t fallback)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#elif LINUX_VERSION_IS_GEQ(3,13,0)
+static u16
+mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
+ void *accel_priv)
diff --git a/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch b/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch
index 4fa4df6e..6cccf460 100644
--- a/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch
+++ b/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch
@@ -4,7 +4,7 @@
input_sync(dev);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
static int hidp_get_raw_report(struct hid_device *hid,
unsigned char report_number,
unsigned char *data, size_t count,
@@ -20,7 +20,7 @@
.stop = hidp_stop,
.open = hidp_open,
.close = hidp_close,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
.raw_request = hidp_raw_request,
.output_report = hidp_output_report,
+#endif
diff --git a/patches/0030-qdisc_tx_busylock/bluetooth.patch b/patches/0030-qdisc_tx_busylock/bluetooth.patch
index 0b88b613..1025f03b 100644
--- a/patches/0030-qdisc_tx_busylock/bluetooth.patch
+++ b/patches/0030-qdisc_tx_busylock/bluetooth.patch
@@ -4,7 +4,7 @@
return err < 0 ? NET_XMIT_DROP : err;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
static struct lock_class_key bt_tx_busylock;
+#endif
static struct lock_class_key bt_netdev_xmit_lock_key;
@@ -14,7 +14,7 @@
static int bt_dev_init(struct net_device *dev)
{
netdev_for_each_tx_queue(dev, bt_set_lockdep_class_one, NULL);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
dev->qdisc_tx_busylock = &bt_tx_busylock;
+#endif
diff --git a/patches/0030-qdisc_tx_busylock/ieee802154.patch b/patches/0030-qdisc_tx_busylock/ieee802154.patch
index b905b050..3794a025 100644
--- a/patches/0030-qdisc_tx_busylock/ieee802154.patch
+++ b/patches/0030-qdisc_tx_busylock/ieee802154.patch
@@ -4,7 +4,7 @@
.create = lowpan_header_create,
};
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
static struct lock_class_key lowpan_tx_busylock;
+#endif
static struct lock_class_key lowpan_netdev_xmit_lock_key;
@@ -14,7 +14,7 @@
static int lowpan_dev_init(struct net_device *dev)
{
netdev_for_each_tx_queue(dev, lowpan_set_lockdep_class_one, NULL);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
dev->qdisc_tx_busylock = &lowpan_tx_busylock;
+#endif
return 0;
diff --git a/patches/0031-sk_data_ready.cocci b/patches/0031-sk_data_ready.cocci
index 2716eddd..44a41c96 100644
--- a/patches/0031-sk_data_ready.cocci
+++ b/patches/0031-sk_data_ready.cocci
@@ -68,7 +68,7 @@ drv_data_ready(struct sock *sk)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_LESS(3,15,0)
+static void backport_drv_data_ready(struct sock *sk, int unused)
+{
+ drv_data_ready(sk);
@@ -81,7 +81,7 @@ identifier sk_data_ready_assigned.drv_data_ready;
fresh identifier backport_drv_data_ready = "backport_" ## drv_data_ready;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
E->sk_data_ready = drv_data_ready;
+#else
+ E->sk_data_ready = backport_drv_data_ready;
@@ -98,7 +98,7 @@ struct sock *sk;
expression E;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
E->sk_data_ready(E);
+#else
+ E->sk_data_ready(E, 0);
@@ -111,7 +111,7 @@ identifier sk_data_ready;
@@
skb_queue_tail(&sk->sk_receive_queue, skb);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
sk->sk_data_ready(sk);
+#else
+ sk->sk_data_ready(sk, skb->len);
diff --git a/patches/0032-sriov_configure/igb_sriov_configure.patch b/patches/0032-sriov_configure/igb_sriov_configure.patch
index 2167b7c2..77e5eac9 100644
--- a/patches/0032-sriov_configure/igb_sriov_configure.patch
+++ b/patches/0032-sriov_configure/igb_sriov_configure.patch
@@ -4,7 +4,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
static int igb_pci_disable_sriov(struct pci_dev *dev)
{
int err = igb_disable_sriov(dev);
@@ -12,7 +12,7 @@
return err;
}
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,8,0) */
static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs)
{
diff --git a/patches/0032-sriov_configure/sriov_configure.cocci b/patches/0032-sriov_configure/sriov_configure.cocci
index 52920b84..9f9f1794 100644
--- a/patches/0032-sriov_configure/sriov_configure.cocci
+++ b/patches/0032-sriov_configure/sriov_configure.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct pci_driver s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
.sriov_configure = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,8,0) */
};
// ----------------------------------------------------------------------
@@ -14,6 +14,6 @@ struct pci_driver s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,8,0) */
diff --git a/patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch b/patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch
index 362b544b..2441af6e 100644
--- a/patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch
+++ b/patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch
@@ -4,13 +4,13 @@
return cdc_mbim_manage_power(dev, status);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
static int cdc_mbim_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+static int cdc_mbim_rx_add_vid(struct net_device *netdev, u16 vid)
+#else
+static void cdc_mbim_rx_add_vid(struct net_device *netdev, u16 vid)
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
{
struct usbnet *dev = netdev_priv(netdev);
struct cdc_mbim_state *info = (void *)&dev->data;
@@ -18,21 +18,21 @@
/* creation of this VLAN is a request to tag IP session 0 */
if (vid == MBIM_IPS0_VID)
info->flags |= FLAG_IPS0_VLAN;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
else
if (vid >= 512) /* we don't map these to MBIM session */
return -EINVAL;
return 0;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
static int cdc_mbim_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+static int cdc_mbim_rx_kill_vid(struct net_device *netdev, u16 vid)
+#else
+static void cdc_mbim_rx_kill_vid(struct net_device *netdev, u16 vid)
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
{
struct usbnet *dev = netdev_priv(netdev);
struct cdc_mbim_state *info = (void *)&dev->data;
@@ -40,9 +40,9 @@
/* this is a request for an untagged IP session 0 */
if (vid == MBIM_IPS0_VID)
info->flags &= ~FLAG_IPS0_VLAN;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
return 0;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
}
static const struct net_device_ops cdc_mbim_netdev_ops = {
diff --git a/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch b/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch
index 5d174c29..093af647 100644
--- a/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch
+++ b/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch
@@ -4,16 +4,16 @@
static void igb_reset_task(struct work_struct *);
static void igb_vlan_mode(struct net_device *netdev,
netdev_features_t features);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
static int igb_vlan_rx_add_vid(struct net_device *, __be16, u16);
static int igb_vlan_rx_kill_vid(struct net_device *, __be16, u16);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+static int igb_vlan_rx_add_vid(struct net_device *, u16);
+static int igb_vlan_rx_kill_vid(struct net_device *, u16);
+#else
+static void igb_vlan_rx_add_vid(struct net_device *, u16);
+static void igb_vlan_rx_kill_vid(struct net_device *, u16);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
static void igb_restore_vlan(struct igb_adapter *);
static void igb_rar_set_qsel(struct igb_adapter *, u8 *, u32 , u8);
static void igb_ping_all_vfs(struct igb_adapter *);
@@ -21,10 +21,10 @@
igb_set_vf_vlan_strip(adapter, adapter->vfs_allocated_count, enable);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
static int igb_vlan_rx_add_vid(struct net_device *netdev,
__be16 proto, u16 vid)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+static int igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
+#else
+static void igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
@@ -36,19 +36,19 @@
set_bit(vid, adapter->active_vlans);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
return 0;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
static int igb_vlan_rx_kill_vid(struct net_device *netdev,
__be16 proto, u16 vid)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+static int igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
+#else
+static void igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
{
struct igb_adapter *adapter = netdev_priv(netdev);
int pf_id = adapter->vfs_allocated_count;
@@ -56,9 +56,9 @@
clear_bit(vid, adapter->active_vlans);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
return 0;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
}
static void igb_restore_vlan(struct igb_adapter *adapter)
@@ -66,18 +66,18 @@
u16 vid = 1;
igb_vlan_mode(adapter->netdev, adapter->netdev->features);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
+#else
+ igb_vlan_rx_add_vid(adapter->netdev, 0);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
for_each_set_bit_from(vid, adapter->active_vlans, VLAN_N_VID)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#if LINUX_VERSION_IS_GEQ(3,10,0)
igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
+#else
+ igb_vlan_rx_add_vid(adapter->netdev, vid);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */
}
int igb_set_spd_dplx(struct igb_adapter *adapter, u32 spd, u8 dplx)
diff --git a/patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci b/patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci
index 7be32c0b..de3e6e7d 100644
--- a/patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci
+++ b/patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct net_device_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
.ndo_set_vf_spoofchk = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
};
@r2@
@@ -22,9 +22,9 @@ struct net_device_ops s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
@@
identifier r2.func2, ivi;
@@ -34,8 +34,8 @@ expression assign;
func2(... ,struct ifla_vf_info *ivi)
{
<...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
ivi->spoofchk = assign;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
...>
}
diff --git a/patches/0035-skb_no_fcs/skb_no_fcs.cocci b/patches/0035-skb_no_fcs/skb_no_fcs.cocci
index 703c227e..12eaf6d7 100644
--- a/patches/0035-skb_no_fcs/skb_no_fcs.cocci
+++ b/patches/0035-skb_no_fcs/skb_no_fcs.cocci
@@ -2,6 +2,6 @@
expression E1,E2;
struct sk_buff *skb;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
E1 ^= E2(..., skb->no_fcs, ...)
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,18,0) */
diff --git a/patches/0036-ethtool_eee/ethtool_eee.cocci b/patches/0036-ethtool_eee/ethtool_eee.cocci
index 7c2d2fe0..48b0467e 100644
--- a/patches/0036-ethtool_eee/ethtool_eee.cocci
+++ b/patches/0036-ethtool_eee/ethtool_eee.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct ethtool_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
.get_eee = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */
};
@r2@
@@ -13,9 +13,9 @@ identifier s, func;
@@
struct ethtool_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
.set_eee = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */
};
// ----------------------------------------------------------------------
@@ -24,14 +24,14 @@ struct ethtool_ops s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */
@@
identifier r2.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */
diff --git a/patches/0037-ethtool_get_module/get_module.cocci b/patches/0037-ethtool_get_module/get_module.cocci
index c04ccc41..eead7904 100644
--- a/patches/0037-ethtool_get_module/get_module.cocci
+++ b/patches/0037-ethtool_get_module/get_module.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct ethtool_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
.get_module_info = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
};
@r2@
@@ -13,9 +13,9 @@ identifier s, func;
@@
struct ethtool_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
.get_module_eeprom = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
};
// ----------------------------------------------------------------------
@@ -24,14 +24,14 @@ struct ethtool_ops s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
@@
identifier r2.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_GEQ(3,5,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
diff --git a/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch b/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch
index cef5ce3b..73666630 100644
--- a/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch
+++ b/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch
@@ -4,16 +4,16 @@
pm_runtime_put(&adapter->pdev->dev);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
static u32 igb_get_rxfh_indir_size(struct net_device *netdev)
{
return IGB_RETA_SIZE;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
u8 *hfunc)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#elif LINUX_VERSION_IS_GEQ(3,16,0)
+static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
+#else
+static int igb_get_rxfh(struct net_device *netdev, u32 *indir)
@@ -22,7 +22,7 @@
struct igb_adapter *adapter = netdev_priv(netdev);
int i;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
if (hfunc)
*hfunc = ETH_RSS_HASH_TOP;
+#endif
@@ -33,7 +33,7 @@
return 0;
}
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
void igb_write_rss_indir_tbl(struct igb_adapter *adapter)
{
@@ -41,11 +41,11 @@
}
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
static int igb_set_rxfh(struct net_device *netdev, const u32 *indir,
const u8 *key, const u8 hfunc)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#elif LINUX_VERSION_IS_GEQ(3,16,0)
+static int igb_set_rxfh(struct net_device *netdev, const u32 *indir,
+ const u8 *key)
+#else
@@ -57,7 +57,7 @@
int i;
u32 num_queues;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
/* We do not allow change in unsupported parameters */
if (key ||
(hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP))
@@ -70,7 +70,7 @@
return 0;
}
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
static unsigned int igb_max_channels(struct igb_adapter *adapter)
{
@@ -78,15 +78,15 @@
.set_eee = igb_set_eee,
.get_module_info = igb_get_module_info,
.get_module_eeprom = igb_get_module_eeprom,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
.get_rxfh_indir_size = igb_get_rxfh_indir_size,
.get_rxfh = igb_get_rxfh,
.set_rxfh = igb_set_rxfh,
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#elif LINUX_VERSION_IS_GEQ(3,3,0)
+ .get_rxfh_indir_size = igb_get_rxfh_indir_size,
+ .get_rxfh_indir = igb_get_rxfh,
+ .set_rxfh_indir = igb_set_rxfh,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */
.get_channels = igb_get_channels,
.set_channels = igb_set_channels,
.begin = igb_ethtool_begin,
diff --git a/patches/0039-ethtool_rxnfc/rxnfc.cocci b/patches/0039-ethtool_rxnfc/rxnfc.cocci
index e546f4d5..72920439 100644
--- a/patches/0039-ethtool_rxnfc/rxnfc.cocci
+++ b/patches/0039-ethtool_rxnfc/rxnfc.cocci
@@ -14,9 +14,9 @@ typedef u32;
// ----------------------------------------------------------------------
func(...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
,u32 *rule_locs
+#else
+,void *rule_locs
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
) { ... }
diff --git a/patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci b/patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci
index b32973bf..479821e5 100644
--- a/patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci
+++ b/patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci
@@ -2,13 +2,13 @@
expression E1;
struct ethtool_cmd *ecmd;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
ecmd->eth_tp_mdix_ctrl = E1;
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,7,0) */
@r2@
struct ethtool_cmd *ecmd;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
if (ecmd->eth_tp_mdix_ctrl) {...}
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,7,0) */
diff --git a/patches/0042-pci_error_handlers/atl1e.patch b/patches/0042-pci_error_handlers/atl1e.patch
index 2e83131f..2bfc1d5e 100644
--- a/patches/0042-pci_error_handlers/atl1e.patch
+++ b/patches/0042-pci_error_handlers/atl1e.patch
@@ -4,11 +4,11 @@
netif_device_attach(netdev);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
static const struct pci_error_handlers atl1e_err_handler = {
+#else
+static struct pci_error_handlers atl1e_err_handler = {
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,7,0) */
.error_detected = atl1e_io_error_detected,
.slot_reset = atl1e_io_slot_reset,
.resume = atl1e_io_resume,
diff --git a/patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci b/patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci
index 19147e95..4c8ba748 100644
--- a/patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci
+++ b/patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci
@@ -3,7 +3,7 @@ identifier s;
@@
static
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#if LINUX_VERSION_IS_GEQ(3,7,0)
const
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,7,0) */
struct pci_error_handlers s = { ... };
diff --git a/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch b/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch
index 6dea4e1e..5e086bff 100644
--- a/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch
+++ b/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch
@@ -4,7 +4,7 @@
if (hw->mac.type != e1000_82576)
return -EOPNOTSUPP;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
if (min_tx_rate)
return -EINVAL;
@@ -22,7 +22,7 @@
+ adapter->vf_rate_link_speed = actual_link_speed;
+ adapter->vf_data[vf].tx_rate = (u16)tx_rate;
+ igb_set_vf_rate_limit(hw, vf, tx_rate, actual_link_speed);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */
return 0;
}
diff --git a/patches/0043-ndo_set_vf_rate/set_vf_rate.cocci b/patches/0043-ndo_set_vf_rate/set_vf_rate.cocci
index c8c3af0a..d322185b 100644
--- a/patches/0043-ndo_set_vf_rate/set_vf_rate.cocci
+++ b/patches/0043-ndo_set_vf_rate/set_vf_rate.cocci
@@ -3,11 +3,11 @@ identifier s, func;
@@
struct net_device_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
.ndo_set_vf_rate = func,
+#else
+.ndo_set_vf_tx_rate = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */
};
@r2@
@@ -25,11 +25,11 @@ identifier r1.func, min_tx_rate, max_tx_rate;
@@
func(...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
,int min_tx_rate, int max_tx_rate
+#else
+,int tx_rate
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */
) { ... }
@@
@@ -40,11 +40,11 @@ expression assign, assign2;
func2(... ,struct ifla_vf_info *ivi)
{
<...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
ivi->max_tx_rate = assign;
ivi->min_tx_rate = assign2;
+#else
+ivi->tx_rate = assign;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */
...>
}
diff --git a/patches/0044-no_user_ns_in_net/ieee802154.patch b/patches/0044-no_user_ns_in_net/ieee802154.patch
index 79d1c4a4..6c3cd210 100644
--- a/patches/0044-no_user_ns_in_net/ieee802154.patch
+++ b/patches/0044-no_user_ns_in_net/ieee802154.patch
@@ -4,7 +4,7 @@
ro->want_ack = !!val;
break;
case WPAN_SECURITY:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
if (!ns_capable(net->user_ns, CAP_NET_ADMIN) &&
!ns_capable(net->user_ns, CAP_NET_RAW)) {
+#else
@@ -18,7 +18,7 @@
}
break;
case WPAN_SECURITY_LEVEL:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++#if LINUX_VERSION_IS_GEQ(3,8,0)
if (!ns_capable(net->user_ns, CAP_NET_ADMIN) &&
!ns_capable(net->user_ns, CAP_NET_RAW)) {
+#else
diff --git a/patches/0047-write_iter/bluetooth.patch b/patches/0047-write_iter/bluetooth.patch
index aa888d70..093b526c 100644
--- a/patches/0047-write_iter/bluetooth.patch
+++ b/patches/0047-write_iter/bluetooth.patch
@@ -4,7 +4,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
static inline ssize_t vhci_get_user(struct vhci_data *data,
struct iov_iter *from)
{
@@ -30,7 +30,7 @@
if (!skb)
return -ENOMEM;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
if (copy_from_iter(skb_put(skb, len), len, from) != len) {
kfree_skb(skb);
return -EFAULT;
@@ -51,7 +51,7 @@
return ret;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from)
+#else
+static ssize_t vhci_write(struct kiocb *iocb, const struct iovec *iov,
@@ -61,7 +61,7 @@
struct file *file = iocb->ki_filp;
struct vhci_data *data = file->private_data;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
return vhci_get_user(data, from);
+#else
+ return vhci_get_user(data, iov, count);
@@ -73,7 +73,7 @@
static const struct file_operations vhci_fops = {
.owner = THIS_MODULE,
.read = vhci_read,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
.write_iter = vhci_write,
+#else
+ .aio_write = vhci_write,
diff --git a/patches/0049-no-pfmemalloc/no-pfmemalloc.cocci b/patches/0049-no-pfmemalloc/no-pfmemalloc.cocci
index 5c6dd242..7a494548 100644
--- a/patches/0049-no-pfmemalloc/no-pfmemalloc.cocci
+++ b/patches/0049-no-pfmemalloc/no-pfmemalloc.cocci
@@ -3,7 +3,7 @@ struct page *page;
expression E1;
@@
return E1
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
++#if LINUX_VERSION_IS_GEQ(3,6,0)
|| page_is_pfmemalloc(page)
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,6,0) */
;
diff --git a/patches/0050-iov_iter/bluetooth.patch b/patches/0050-iov_iter/bluetooth.patch
index ef5bd6a7..87506ff1 100644
--- a/patches/0050-iov_iter/bluetooth.patch
+++ b/patches/0050-iov_iter/bluetooth.patch
@@ -4,7 +4,7 @@
struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
unsigned long hdr_len,
unsigned long len, int nb);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ int (*memcpy_fromiovec) (struct l2cap_chan *chan,
+ unsigned char *kdata,
+ struct iovec *iov,
@@ -17,7 +17,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan,
+ unsigned char *kdata,
+ struct iovec *iov,
@@ -53,7 +53,7 @@
*/
chan->data = skb;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ memset(&msg, 0, sizeof(msg));
+ msg.msg_iov = (struct iovec *) &iv;
+ msg.msg_iovlen = 1;
@@ -61,7 +61,7 @@
iv.iov_base = skb->data;
iv.iov_len = skb->len;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
memset(&msg, 0, sizeof(msg));
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, skb->len);
+#endif
@@ -72,7 +72,7 @@
.suspend = chan_suspend_cb,
.get_sndtimeo = chan_get_sndtimeo_cb,
.alloc_skb = chan_alloc_skb_cb,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
+#endif
@@ -84,7 +84,7 @@
memset(&msg, 0, sizeof(msg));
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, total_len);
+#else
+ msg.msg_iov = (struct iovec *) &iv;
@@ -97,7 +97,7 @@
.resume = l2cap_chan_no_resume,
.set_shutdown = l2cap_chan_no_set_shutdown,
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
+#endif
};
@@ -109,7 +109,7 @@
struct sk_buff **frag;
int sent = 0;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
if (copy_from_iter(skb_put(skb, count), count, &msg->msg_iter) != count)
+#else
+ if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count),
@@ -122,7 +122,7 @@
*frag = tmp;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
if (copy_from_iter(skb_put(*frag, count), count,
&msg->msg_iter) != count)
+#else
@@ -138,7 +138,7 @@
return skb;
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan,
+ unsigned char *kdata,
+ struct iovec *iov, int len)
@@ -154,7 +154,7 @@
.set_shutdown = l2cap_sock_set_shutdown_cb,
.get_sndtimeo = l2cap_sock_get_sndtimeo_cb,
.alloc_skb = l2cap_sock_alloc_skb_cb,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ .memcpy_fromiovec = l2cap_sock_memcpy_fromiovec_cb,
+#endif
};
@@ -166,7 +166,7 @@
memset(&msg, 0, sizeof(msg));
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len);
+#else
+ msg.msg_iov = (struct iovec *) &iv;
@@ -179,7 +179,7 @@
.suspend = l2cap_chan_no_suspend,
.set_shutdown = l2cap_chan_no_set_shutdown,
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
+#endif
};
@@ -189,7 +189,7 @@
.resume = l2cap_chan_no_resume,
.set_shutdown = l2cap_chan_no_set_shutdown,
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
+#endif
};
diff --git a/patches/0051-no-wakeup_path/ssb.patch b/patches/0051-no-wakeup_path/ssb.patch
index 23bab03b..dcebbcdf 100644
--- a/patches/0051-no-wakeup_path/ssb.patch
+++ b/patches/0051-no-wakeup_path/ssb.patch
@@ -4,9 +4,9 @@
/* if there is a wakeup enabled child device on ssb bus,
enable pci wakeup posibility. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++#if LINUX_VERSION_IS_GEQ(3,2,0)
device_set_wakeup_enable(d, d->power.wakeup_path);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
pci_prepare_to_sleep(dev);
diff --git a/patches/0052-deactivate-ptp-pin/igb.patch b/patches/0052-deactivate-ptp-pin/igb.patch
index 4e09f6f5..a82dd754 100644
--- a/patches/0052-deactivate-ptp-pin/igb.patch
+++ b/patches/0052-deactivate-ptp-pin/igb.patch
@@ -4,7 +4,7 @@
u32 tx_hwtstamp_timeouts;
u32 rx_hwtstamp_cleared;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
struct ptp_pin_desc sdp_config[IGB_N_SDP];
+#endif
struct {
@@ -16,7 +16,7 @@
return val;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
/* SYSTIM read access for I210/I211 */
static void igb_ptp_read_i210(struct igb_adapter *adapter,
struct timespec64 *ts)
@@ -32,7 +32,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
static int igb_ptp_adjtime_i210(struct ptp_clock_info *ptp, s64 delta)
{
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
@@ -48,7 +48,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
static int igb_ptp_gettime_i210(struct ptp_clock_info *ptp,
struct timespec64 *ts)
{
@@ -64,7 +64,7 @@
return 0;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
static int igb_ptp_settime_i210(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{
@@ -80,7 +80,7 @@
return -EOPNOTSUPP;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
static int igb_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
enum ptp_pin_function func, unsigned int chan)
{
@@ -96,7 +96,7 @@
{
struct e1000_hw *hw = &adapter->hw;
struct net_device *netdev = adapter->netdev;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
int i;
+#endif
@@ -106,7 +106,7 @@
/* Enable the timer functions by clearing bit 31. */
wr32(E1000_TSAUXC, 0x0);
break;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
case e1000_i210:
case e1000_i211:
for (i = 0; i < IGB_N_SDP; i++) {
@@ -122,7 +122,7 @@
INIT_WORK(&adapter->ptp_tx_work, igb_ptp_tx_work);
/* Initialize the clock and overflow work for devices that need it. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
++#if LINUX_VERSION_IS_GEQ(3,15,0)
if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
diff --git a/patches/0053-remove_wait_on_bit_timeout/btusb.patch b/patches/0053-remove_wait_on_bit_timeout/btusb.patch
index 3c4e87b1..52ed8b12 100644
--- a/patches/0053-remove_wait_on_bit_timeout/btusb.patch
+++ b/patches/0053-remove_wait_on_bit_timeout/btusb.patch
@@ -4,7 +4,7 @@
return;
if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&data->flags, BTUSB_BOOTING);
+#else
@@ -17,7 +17,7 @@
if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) &&
test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&data->flags, BTUSB_DOWNLOADING);
+#else
@@ -30,7 +30,7 @@
* and thus just timeout if that happens and fail the setup
* of this device.
*/
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
@@ -70,7 +70,7 @@
*/
BT_INFO("%s: Waiting for device to boot", hdev->name);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
diff --git a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch b/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch
index f53cd047..c32df12c 100644
--- a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch
+++ b/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch
@@ -7,7 +7,7 @@
- int err;
+ int err = 0;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
@@ -52,7 +52,7 @@
- int err;
+ int err = 0;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
@@ -90,7 +90,7 @@
* and thus just timeout if that happens and fail the setup
* of this device.
*/
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
@@ -132,7 +132,7 @@
if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) &&
test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&intel->flags, STATE_DOWNLOADING);
+#else
@@ -145,7 +145,7 @@
} else if (skb->len == 9 && hdr->evt == 0xff && hdr->plen == 0x07 &&
skb->data[2] == 0x02) {
if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&intel->flags, STATE_BOOTING);
+#else
@@ -158,7 +158,7 @@
case LPM_OP_SUSPEND_ACK:
set_bit(STATE_SUSPENDED, &intel->flags);
if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION);
+#else
@@ -169,7 +169,7 @@
case LPM_OP_RESUME_ACK:
clear_bit(STATE_SUSPENDED, &intel->flags);
if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
smp_mb__after_atomic();
wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION);
+#else
diff --git a/patches/0054-struct-proto_ops-sig.cocci b/patches/0054-struct-proto_ops-sig.cocci
index 64df8ab5..1d190dcd 100644
--- a/patches/0054-struct-proto_ops-sig.cocci
+++ b/patches/0054-struct-proto_ops-sig.cocci
@@ -42,12 +42,12 @@ send_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_send(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len)
+{
+ return send_func(sock, msg, len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_recv depends on proto_ops @
identifier proto_ops.recv_func;
@@ -59,24 +59,24 @@ recv_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_recv(struct kiocb *iocb, struct socket *sock,
+ struct msghdr *msg, size_t len, int flags)
+{
+ return recv_func(sock, msg, len, flags);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_proto_ops_tx depends on proto_ops && mod_send @
identifier s, proto_ops.send_func, mod_send.backport_send;
@@
struct proto_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.sendmsg = send_func,
+#else
+ .sendmsg = backport_send,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_proto_ops_rx depends on proto_ops && mod_recv @
@@ -84,11 +84,11 @@ identifier s, proto_ops.recv_func, mod_recv.backport_recv;
@@
struct proto_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.recvmsg = recv_func,
+#else
+ .recvmsg = backport_recv,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_sock_send_callers depends on proto_ops@
@@ -99,11 +99,11 @@ identifier sock, msg, len, sk;
send_func(struct socket *sock, struct msghdr *msg, size_t len)
{
...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
return sk->sk_prot->sendmsg(sk, msg, len);
+#else
+ return sk->sk_prot->sendmsg(NULL, sk, msg, len);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
}
@ proto @
@@ -125,13 +125,13 @@ send_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_send(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len)
+{
+ return send_func(sk, msg, len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ proto_mod_recv depends on proto @
identifier proto.recv_func;
@@ -143,25 +143,25 @@ recv_func(...)
...
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_LESS(4,1,0)
+static int backport_recv(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len,
+ int noblock, int flags, int *addr_len)
+{
+ return recv_func(sk, msg, len, noblock, flags, addr_len);
+}
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
@ mod_proto_tx depends on proto && proto_mod_send @
identifier s, proto.send_func, proto_mod_send.backport_send;
@@
struct proto s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.sendmsg = send_func,
+#else
+ .sendmsg = backport_send,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
@ mod_proto_rx depends on proto && proto_mod_recv @
@@ -169,9 +169,9 @@ identifier s, proto.recv_func, proto_mod_recv.backport_recv;
@@
struct proto s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
.recvmsg = recv_func,
+#else
+ .recvmsg = backport_recv,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
};
diff --git a/patches/0055-name_assign_type/brcmfmac.patch b/patches/0055-name_assign_type/brcmfmac.patch
index 99157866..9e2d7634 100644
--- a/patches/0055-name_assign_type/brcmfmac.patch
+++ b/patches/0055-name_assign_type/brcmfmac.patch
@@ -4,7 +4,7 @@
}
strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
ifp->ndev->name_assign_type = name_assign_type;
+#endif /* >= 3.17.0 */
err = brcmf_net_attach(ifp, true);
diff --git a/patches/0056-ndo_features_check/features_check.cocci b/patches/0056-ndo_features_check/features_check.cocci
index 1fee8d18..ca15d3a0 100644
--- a/patches/0056-ndo_features_check/features_check.cocci
+++ b/patches/0056-ndo_features_check/features_check.cocci
@@ -3,9 +3,9 @@ identifier s, func;
@@
struct net_device_ops s = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
.ndo_features_check = func,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,19,0) */
};
// ----------------------------------------------------------------------
@@ -14,6 +14,6 @@ struct net_device_ops s = {
identifier r1.func;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
func(...) { ... }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,19,0) */
diff --git a/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci b/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci
index 3f85c2a4..ff17ebde 100644
--- a/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci
+++ b/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci
@@ -3,31 +3,31 @@
@r1@
expression E1, E2;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
E1.gettime64 = E2;
+#else
+E1.gettime = E2;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
// ----------------------------------------------------------------------------
// handle calls to gettime64 as calls to gettime
@r2@
expression E1, E2, E3;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
E1.gettime64(E2, E3);
+#else
+E1.gettime(E2, E3);
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
// ----------------------------------------------------------------------------
// handle settime64 to settime function assignments
@r3@
expression E1, E2;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#if LINUX_VERSION_IS_GEQ(4,1,0)
E1.settime64 = E2;
+#else
+E1.settime = E2;
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */
++#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */
diff --git a/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci b/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
index ab207bda..ab20c833 100644
--- a/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
+++ b/patches/0059-skb_xmit_more/skb_no_xmit_more.cocci
@@ -3,7 +3,7 @@ struct sk_buff *skb;
expression E1;
@@
if (E1
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_IS_GEQ(3,18,0)
|| !skb->xmit_more
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,18,0) */
) {...}
diff --git a/patches/0059-uuid-in-mei/nfc.patch b/patches/0059-uuid-in-mei/nfc.patch
index 903cac30..9953c819 100644
--- a/patches/0059-uuid-in-mei/nfc.patch
+++ b/patches/0059-uuid-in-mei/nfc.patch
@@ -4,9 +4,9 @@
}
static struct mei_cl_device_id microread_mei_tbl[] = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#if LINUX_VERSION_IS_GEQ(4,4,0)
{ MICROREAD_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#elif LINUX_VERSION_IS_GEQ(4,2,0)
+ { MICROREAD_DRIVER_NAME, MEI_NFC_UUID},
+#else
+ { MICROREAD_DRIVER_NAME},
@@ -20,9 +20,9 @@
}
static struct mei_cl_device_id pn544_mei_tbl[] = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#if LINUX_VERSION_IS_GEQ(4,4,0)
{ PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#elif LINUX_VERSION_IS_GEQ(4,2,0)
+ { PN544_DRIVER_NAME, MEI_NFC_UUID},
+#else
+ { PN544_DRIVER_NAME},
diff --git a/patches/0060-trace_field_struct/mt7601u.patch b/patches/0060-trace_field_struct/mt7601u.patch
index 4e29b2c6..8b4af1f3 100644
--- a/patches/0060-trace_field_struct/mt7601u.patch
+++ b/patches/0060-trace_field_struct/mt7601u.patch
@@ -6,7 +6,7 @@ index 2898973..7fa1b96 100644
DEV_PR_ARG, __entry->phy_mode, __entry->freq_off)
);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
++#if LINUX_VERSION_IS_GEQ(3,16,0)
TRACE_EVENT(mt_rx,
TP_PROTO(struct mt7601u_dev *dev, struct mt7601u_rxwi *rxwi, u32 f),
TP_ARGS(dev, rxwi, f),
@@ -27,7 +27,7 @@ index 2898973..7fa1b96 100644
+{
+}
+#endif /* __BACKPORT_MT7601U_TRACE_H_EXTRA */
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */
TRACE_EVENT(mt_tx_dma_done,
TP_PROTO(struct mt7601u_dev *dev, struct sk_buff *skb),
diff --git a/patches/0061-termios_rwsem/nfc.patch b/patches/0061-termios_rwsem/nfc.patch
index 73714151..c8ad8b46 100644
--- a/patches/0061-termios_rwsem/nfc.patch
+++ b/patches/0061-termios_rwsem/nfc.patch
@@ -4,17 +4,17 @@
if (!nu->tty)
return;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
down_read(&nu->tty->termios_rwsem);
+#else
+ mutex_lock(&nu->tty->termios_mutex);
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,12,0) */
new_termios = nu->tty->termios;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
up_read(&nu->tty->termios_rwsem);
+#else
+ mutex_unlock(&nu->tty->termios_mutex);
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
++#endif /* if LINUX_VERSION_IS_GEQ(3,12,0) */
tty_termios_encode_baud_rate(&new_termios, baudrate, baudrate);
if (flow_ctrl)
diff --git a/patches/0062-acpi-gpio-remove/hci_bcm.patch b/patches/0062-acpi-gpio-remove/hci_bcm.patch
index db98d4be..77e343ee 100644
--- a/patches/0062-acpi-gpio-remove/hci_bcm.patch
+++ b/patches/0062-acpi-gpio-remove/hci_bcm.patch
@@ -4,7 +4,7 @@
#include <linux/acpi.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
#include <linux/gpio/consumer.h>
+#endif
#include <linux/tty.h>
@@ -14,7 +14,7 @@
if (powered && !IS_ERR(dev->clk) && !dev->clk_enabled)
clk_enable(dev->clk);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
gpiod_set_value(dev->shutdown, powered);
gpiod_set_value(dev->device_wakeup, powered);
+#endif
@@ -25,7 +25,7 @@
/* Suspend the device */
if (bdev->device_wakeup) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
gpiod_set_value(bdev->device_wakeup, false);
+#endif
bt_dev_dbg(bdev, "suspend, delaying 15 ms");
@@ -35,7 +35,7 @@
bt_dev_dbg(bdev, "");
if (bdev->device_wakeup) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
gpiod_set_value(bdev->device_wakeup, true);
+#endif
bt_dev_dbg(bdev, "resume, delaying 15 ms");
@@ -45,7 +45,7 @@
}
#endif
-+#if defined(CONFIG_ACPI) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0)
static const struct acpi_gpio_params device_wakeup_gpios = { 0, 0, false };
static const struct acpi_gpio_params shutdown_gpios = { 1, 0, false };
static const struct acpi_gpio_params host_wakeup_gpios = { 2, 0, false };
@@ -62,7 +62,7 @@
};
-#ifdef CONFIG_ACPI
-+#if defined(CONFIG_ACPI) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0)
static const struct acpi_device_id bcm_acpi_match[] = {
{ "BCM2E1A", 0 },
{ "BCM2E39", 0 },
@@ -70,7 +70,7 @@
.remove = bcm_remove,
.driver = {
.name = "hci_bcm",
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
.acpi_match_table = ACPI_PTR(bcm_acpi_match),
+#endif
.pm = &bcm_pm_ops,
diff --git a/patches/0062-acpi-gpio-remove/hci_intel.patch b/patches/0062-acpi-gpio-remove/hci_intel.patch
index f80b6388..9237ce97 100644
--- a/patches/0062-acpi-gpio-remove/hci_intel.patch
+++ b/patches/0062-acpi-gpio-remove/hci_intel.patch
@@ -4,7 +4,7 @@
#include <linux/wait.h>
#include <linux/tty.h>
#include <linux/platform_device.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
#include <linux/gpio/consumer.h>
+#endif
#include <linux/acpi.h>
@@ -14,7 +14,7 @@
BT_INFO("hu %p, Switching compatible pm device (%s) to %u",
hu, dev_name(&idev->pdev->dev), powered);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
gpiod_set_value(idev->reset, powered);
+#endif
@@ -24,7 +24,7 @@
idev->pdev = pdev;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset",
GPIOD_OUT_LOW);
if (IS_ERR(idev->reset)) {
@@ -34,7 +34,7 @@
+#endif
idev->irq = platform_get_irq(pdev, 0);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
if (idev->irq < 0) {
struct gpio_desc *host_wake;
@@ -48,7 +48,7 @@
device_set_wakeup_capable(&pdev->dev, true);
device_wakeup_disable(&pdev->dev);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
++#if LINUX_VERSION_IS_GEQ(3,17,0)
no_irq:
+#endif
platform_set_drvdata(pdev, idev);
@@ -58,7 +58,7 @@
list_add_tail(&idev->list, &intel_device_list);
mutex_unlock(&intel_device_list_lock);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
dev_info(&pdev->dev, "registered, gpio(%d)/irq(%d).\n",
desc_to_gpio(idev->reset), idev->irq);
+#endif
diff --git a/patches/0062-iff-no-queue.cocci b/patches/0062-iff-no-queue.cocci
index 9c95b853..237985c5 100644
--- a/patches/0062-iff-no-queue.cocci
+++ b/patches/0062-iff-no-queue.cocci
@@ -2,7 +2,7 @@
expression E;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#if LINUX_VERSION_IS_GEQ(4,3,0)
E->priv_flags |= IFF_NO_QUEUE;
+#else
+E->tx_queue_len = 0;
diff --git a/patches/0065-ndisc_send_na-argument.cocci b/patches/0065-ndisc_send_na-argument.cocci
index 84c42091..a3d00f3c 100644
--- a/patches/0065-ndisc_send_na-argument.cocci
+++ b/patches/0065-ndisc_send_na-argument.cocci
@@ -2,7 +2,7 @@
identifier ndisc_send_na;
expression netdev, saddr, target, router, solicited, override, inc_opt;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#if LINUX_VERSION_IS_GEQ(4,4,0)
ipv6_stub->ndisc_send_na(netdev, saddr, target, router, solicited, override, inc_opt);
+#else
+ipv6_stub->ndisc_send_na(netdev, NULL, saddr, target, router, solicited, override, inc_opt);
diff --git a/patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch b/patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch
index 25bf812f..04fd2394 100644
--- a/patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch
+++ b/patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch
@@ -4,7 +4,7 @@
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_GEQ(3,19,0)
static inline int
wpan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
const struct ieee802154_addr *daddr,
diff --git a/patches/0068-proto-hash/ieee802154.patch b/patches/0068-proto-hash/ieee802154.patch
index e60ba564..9b5a9712 100644
--- a/patches/0068-proto-hash/ieee802154.patch
+++ b/patches/0068-proto-hash/ieee802154.patch
@@ -6,7 +6,7 @@ index e0bd013..9e78921 100644
static HLIST_HEAD(raw_head);
static DEFINE_RWLOCK(raw_lock);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_IS_GEQ(4,6,0)
static int raw_hash(struct sock *sk)
+#else
+static void raw_hash(struct sock *sk)
@@ -17,7 +17,7 @@ index e0bd013..9e78921 100644
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
write_unlock_bh(&raw_lock);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_IS_GEQ(4,6,0)
return 0;
+#endif
}
@@ -27,7 +27,7 @@ index e0bd013..9e78921 100644
return container_of(sk, struct dgram_sock, sk);
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_IS_GEQ(4,6,0)
static int dgram_hash(struct sock *sk)
+#else
+static void dgram_hash(struct sock *sk)
@@ -38,7 +38,7 @@ index e0bd013..9e78921 100644
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
write_unlock_bh(&dgram_lock);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_IS_GEQ(4,6,0)
return 0;
+#endif
}
@@ -48,7 +48,7 @@ index e0bd013..9e78921 100644
sock_set_flag(sk, SOCK_ZAPPED);
if (sk->sk_prot->hash) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_IS_GEQ(4,6,0)
rc = sk->sk_prot->hash(sk);
if (rc) {
sk_common_release(sk);
diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch
index e1fe84bb..f8c5766a 100644
--- a/patches/0069-iwlwifi-pd-string-fix.patch
+++ b/patches/0069-iwlwifi-pd-string-fix.patch
@@ -4,7 +4,7 @@
*/
if (priv->mac80211_registered) {
char buf[100];
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
struct dentry *mac80211_dir, *dev_dir;
dev_dir = dbgfs_dir->d_parent;
@@ -30,7 +30,7 @@
mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);
if (!mvmvif->dbgfs_dir) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n",
dbgfs_dir);
+#else
@@ -44,7 +44,7 @@
* find
* netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/
*/
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
snprintf(buf, 100, "../../../%pd3/%pd",
dbgfs_dir,
mvmvif->dbgfs_dir);
@@ -59,7 +59,7 @@
mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name,
mvm->debugfs_dir, buf);
if (!mvmvif->dbgfs_slink)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
IWL_ERR(mvm, "Can't create debugfs symbolic link under %pd\n",
dbgfs_dir);
+#else
@@ -75,7 +75,7 @@
* Create a symlink with mac80211. It will be removed when mac80211
* exists (before the opmode exists which removes the target.)
*/
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
++#if LINUX_VERSION_IS_GEQ(3,12,0)
snprintf(buf, 100, "../../%pd2", dbgfs_dir->d_parent);
+#else
+ snprintf(buf, 100, "../../%s/%s",
diff --git a/patches/0069-remove-of_irq/bcma.patch b/patches/0069-remove-of_irq/bcma.patch
index 71cab170..2c8c7cac 100644
--- a/patches/0069-remove-of_irq/bcma.patch
+++ b/patches/0069-remove-of_irq/bcma.patch
@@ -4,7 +4,7 @@
return NULL;
}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_GEQ(3,13,0)
static int bcma_of_irq_parse(struct device *parent,
struct bcma_device *core,
struct of_phandle_args *out_irq, int num)
diff --git a/patches/0070-mac80211-fils.patch b/patches/0070-mac80211-fils.patch
index 0e8747f9..c45aa2bd 100644
--- a/patches/0070-mac80211-fils.patch
+++ b/patches/0070-mac80211-fils.patch
@@ -3,7 +3,7 @@ index ecfdd97758a3..95fc9669ea4f 100644
--- a/net/mac80211/fils_aead.c
+++ b/net/mac80211/fils_aead.c
@@ -1,3 +1,4 @@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#if LINUX_VERSION_IS_GEQ(4,3,0)
/*
* FILS AEAD for (Re)Association Request/Response frames
* Copyright 2016, Qualcomm Atheros, Inc.
@@ -20,7 +20,7 @@ index fbc65232f0b3..482bc5fcdd18 100644
#ifndef FILS_AEAD_H
#define FILS_AEAD_H
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#if LINUX_VERSION_IS_GEQ(4,3,0)
int fils_encrypt_assoc_req(struct sk_buff *skb,
struct ieee80211_mgd_assoc_data *assoc_data);
int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,
@@ -52,7 +52,7 @@ index a6ecbbf0f47f..afc1517e9729 100644
NL80211_FEATURE_MAC_ON_CREATE |
NL80211_FEATURE_USERSPACE_MPM |
NL80211_FEATURE_FULL_AP_CLIENT_STATE;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#if LINUX_VERSION_IS_GEQ(4,3,0)
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_STA);
+#endif
diff --git a/patches/0071-skb-head_frag/wireless.patch b/patches/0071-skb-head_frag/wireless.patch
index 1d6d8bb2..b314cd75 100644
--- a/patches/0071-skb-head_frag/wireless.patch
+++ b/patches/0071-skb-head_frag/wireless.patch
@@ -4,7 +4,7 @@
u8 *payload;
int offset = 0, remaining, err;
struct ethhdr eth;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
++#if LINUX_VERSION_IS_LESS(3,5,0)
+ bool reuse_frag = 0;
+#else
bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
diff --git a/patches/0072-netdevice-ndo_fdb_add/igb.patch b/patches/0072-netdevice-ndo_fdb_add/igb.patch
index e068ea3b..9dcac3d2 100644
--- a/patches/0072-netdevice-ndo_fdb_add/igb.patch
+++ b/patches/0072-netdevice-ndo_fdb_add/igb.patch
@@ -4,7 +4,7 @@
static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_IS_LESS(3,19,0)
+ const unsigned char *addr,
+#else
const unsigned char *addr, u16 vid,
diff --git a/patches/0073-netdevice-mtu-range.cocci b/patches/0073-netdevice-mtu-range.cocci
index 3e1e7708..7a4b6532 100644
--- a/patches/0073-netdevice-mtu-range.cocci
+++ b/patches/0073-netdevice-mtu-range.cocci
@@ -73,7 +73,7 @@ func(...) {
constant r1.e1,r1.e2;
identifier r.OPS;
@@
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,10,0)
+ static int __change_mtu(struct net_device *ndev, int new_mtu)
+ {
+ if (new_mtu < e1 || new_mtu > e2)
@@ -92,7 +92,7 @@ identifier OPS;
@@
struct net_device_ops OPS = {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,10,0)
+ .ndo_change_mtu = __change_mtu,
+#endif
...
diff --git a/patches/0074-netdevice-mtu-range-ifdefs.cocci b/patches/0074-netdevice-mtu-range-ifdefs.cocci
index ffa7082b..5689f438 100644
--- a/patches/0074-netdevice-mtu-range-ifdefs.cocci
+++ b/patches/0074-netdevice-mtu-range-ifdefs.cocci
@@ -5,7 +5,7 @@ identifier func;
@@
func(...) {
<+...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_GEQ(4,10,0)
ndevexp->min_mtu = E;
+#endif
...+>
@@ -18,7 +18,7 @@ identifier func;
@@
func(...) {
<+...
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_GEQ(4,10,0)
ndevexp->max_mtu = E;
+#endif
...+>
diff --git a/patches/0074-skb-wifi-acked.cocci b/patches/0074-skb-wifi-acked.cocci
index f758ac31..79366df7 100644
--- a/patches/0074-skb-wifi-acked.cocci
+++ b/patches/0074-skb-wifi-acked.cocci
@@ -2,7 +2,7 @@
expression SKB;
expression A, V;
@@
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
++#if LINUX_VERSION_IS_GEQ(3,3,0)
SKB->wifi_acked_valid = V;
SKB->wifi_acked = A;
+#endif
diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci
index ac449de2..a8766492 100644
--- a/patches/0075-ndo-stats-64.cocci
+++ b/patches/0075-ndo-stats-64.cocci
@@ -5,7 +5,7 @@ fresh identifier stats64_fn_wrap = "bp_" ## stats64_fn;
position p;
@@
struct net_device_ops OPS@p = {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_GEQ(4,10,0)
.ndo_get_stats64 = stats64_fn,
+#else
+ .ndo_get_stats64 = stats64_fn_wrap,
@@ -17,7 +17,7 @@ identifier r.stats64_fn_wrap;
identifier r.stats64_fn;
@@
void stats64_fn(...) {...}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,10,0)
+static struct rtnl_link_stats64 *
+stats64_fn_wrap(struct net_device *dev,
+ struct rtnl_link_stats64 *stats)
diff --git a/patches/crypto-ccm.patch b/patches/crypto-ccm.patch
index fe750005..8bdea3db 100644
--- a/patches/crypto-ccm.patch
+++ b/patches/crypto-ccm.patch
@@ -13,7 +13,7 @@
+#include <linux/version.h>
-#include "internal.h"
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
++#if LINUX_VERSION_IS_LESS(3,13,0)
+/* consider properly backporting this? */
+static int crypto_memneq(const void *a, const void *b, size_t size)
+{
diff --git a/patches/devcoredump.patch b/patches/devcoredump.patch
index 9d5454ce..728e1043 100644
--- a/patches/devcoredump.patch
+++ b/patches/devcoredump.patch
@@ -12,7 +12,7 @@
/* if data isn't read by userspace after 5 minutes then delete it */
#define DEVCD_TIMEOUT (HZ * 60 * 5)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_LESS(3,11,0)
+static struct bin_attribute devcd_attr_data;
+#endif
+
@@ -33,7 +33,7 @@
devcd = container_of(wk, struct devcd_entry, del_wk.work);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_LESS(3,11,0)
+ device_remove_bin_file(&devcd->devcd_dev, &devcd_attr_data);
+#endif
device_del(&devcd->devcd_dev);
@@ -43,7 +43,7 @@
.write = devcd_data_write,
};
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_GEQ(3,11,0)
static struct bin_attribute *devcd_dev_bin_attrs[] = {
&devcd_attr_data, NULL,
};
@@ -51,7 +51,7 @@
static const struct attribute_group *devcd_dev_groups[] = {
&devcd_dev_group, NULL,
};
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) */
++#endif /* LINUX_VERSION_IS_GEQ(3,11,0) */
static int devcd_free(struct device *dev, void *data)
{
@@ -59,7 +59,7 @@
.name = "devcoredump",
.owner = THIS_MODULE,
.dev_release = devcd_dev_release,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_GEQ(3,11,0)
.dev_groups = devcd_dev_groups,
+#endif
.class_groups = devcd_class_groups,
@@ -69,7 +69,7 @@
if (device_add(&devcd->devcd_dev))
goto put_device;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
++#if LINUX_VERSION_IS_LESS(3,11,0)
+ if (device_create_bin_file(&devcd->devcd_dev, &devcd_attr_data))
+ goto put_device;
+#endif
diff --git a/patches/flow_dissector.patch b/patches/flow_dissector.patch
index 68434bdb..189a5c7a 100644
--- a/patches/flow_dissector.patch
+++ b/patches/flow_dissector.patch
@@ -4,7 +4,7 @@
flow->ip_proto = ip_proto;
flow->ports = skb_flow_get_ports(skb, nhoff, ip_proto);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
++#if LINUX_VERSION_IS_GEQ(3,9,0)
flow->thoff = (u16) nhoff;
+#endif