[PATCH 06/10] backports: replace struct ethtool_ops get_rxnfc changes with smpl patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Stefan Assmann <sassmann@xxxxxxxxx>
---
 .../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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux