diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-02-07 23:04:11 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-02-09 14:52:26 +0100 |
commit | e13e44d9a81da4bf77d9869db5b4764fc0811d9f (patch) | |
tree | c610ae2b0f634df75fe88f65a047e5c741c9b0af /patches/0043-ndo_set_vf_rate | |
parent | 46939c43903da6b202c95a0fcb24acce55fd63c0 (diff) |
backports: always use new version compare macros
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0043-ndo_set_vf_rate')
-rw-r--r-- | patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch | 4 | ||||
-rw-r--r-- | patches/0043-ndo_set_vf_rate/set_vf_rate.cocci | 12 |
2 files changed, 8 insertions, 8 deletions
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) */ ...> } |