Signed-off-by: Stefan Assmann <sassm...@kpanic.de>
---
 .../network/0039-ethtool_rxnfc/igb_rxnfc.patch     | 16 ----------------
 .../network/0039-ethtool_rxnfc/rxnfc.cocci         | 22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 16 deletions(-)
 delete mode 100644 
patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch
 create mode 100644 
patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci

diff --git 
a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch 
b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch
deleted file mode 100644
index 86425c6..0000000
--- a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
-+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2452,8 +2452,13 @@ static int igb_get_rss_hash_opts(struct
-       return 0;
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
- static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
-                        u32 *rule_locs)
-+#else
-+static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
-+                       void *rule_locs)
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
- {
-       struct igb_adapter *adapter = netdev_priv(dev);
-       int ret = -EOPNOTSUPP;
diff --git 
a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci 
b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci
new file mode 100644
index 0000000..e546f4d
--- /dev/null
+++ b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci
@@ -0,0 +1,22 @@
+@r@
+identifier s,func;
+@@
+
+struct ethtool_ops s = {
+.get_rxnfc = func,
+};
+
+@@
+identifier r.func,rule_locs;
+typedef u32;
+@@
+
+// ----------------------------------------------------------------------
+
+func(...
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
+,u32 *rule_locs
++#else
++,void *rule_locs
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */
+ ) { ... }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to