From: Stefan Assmann <sassmann@kpanic.de>
To: backports@vger.kernel.org
Cc: mcgrof@do-not-panic.com, hauke@hauke-m.de, sassmann@kpanic.de
Subject: [PATCH 01/10] backports: replace struct ethtool_ops get_ts_info changes with smpl patch
Date: Wed, 25 Feb 2015 15:20:45 +0100 [thread overview]
Message-ID: <1424874054-22956-2-git-send-email-sassmann@kpanic.de> (raw)
In-Reply-To: <1424874054-22956-1-git-send-email-sassmann@kpanic.de>
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
.../network/0017-get_ts_info/cdc_ncm.patch | 12 ----------
.../0017-get_ts_info/drivers_net_usb_usbnet.patch | 12 ----------
.../network/0017-get_ts_info/get_ts_info.cocci | 19 +++++++++++++++
.../network/0017-get_ts_info/igb_get_ts_info.patch | 28 ----------------------
4 files changed, 19 insertions(+), 52 deletions(-)
delete mode 100644 patches/collateral-evolutions/network/0017-get_ts_info/cdc_ncm.patch
delete mode 100644 patches/collateral-evolutions/network/0017-get_ts_info/drivers_net_usb_usbnet.patch
create mode 100644 patches/collateral-evolutions/network/0017-get_ts_info/get_ts_info.cocci
delete mode 100644 patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch
diff --git a/patches/collateral-evolutions/network/0017-get_ts_info/cdc_ncm.patch b/patches/collateral-evolutions/network/0017-get_ts_info/cdc_ncm.patch
deleted file mode 100644
index 14101f2..0000000
--- a/patches/collateral-evolutions/network/0017-get_ts_info/cdc_ncm.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/net/usb/cdc_ncm.c
-+++ b/drivers/net/usb/cdc_ncm.c
-@@ -137,7 +137,9 @@ static const struct ethtool_ops cdc_ncm_
- .get_drvinfo = usbnet_get_drvinfo,
- .get_msglevel = usbnet_get_msglevel,
- .set_msglevel = usbnet_set_msglevel,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- .get_ts_info = ethtool_op_get_ts_info,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
- .get_sset_count = cdc_ncm_get_sset_count,
- .get_strings = cdc_ncm_get_strings,
- .get_ethtool_stats = cdc_ncm_get_ethtool_stats,
diff --git a/patches/collateral-evolutions/network/0017-get_ts_info/drivers_net_usb_usbnet.patch b/patches/collateral-evolutions/network/0017-get_ts_info/drivers_net_usb_usbnet.patch
deleted file mode 100644
index c19f6b1..0000000
--- a/patches/collateral-evolutions/network/0017-get_ts_info/drivers_net_usb_usbnet.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/net/usb/usbnet.c
-+++ b/drivers/net/usb/usbnet.c
-@@ -1022,7 +1022,9 @@ static const struct ethtool_ops usbnet_e
- .get_drvinfo = usbnet_get_drvinfo,
- .get_msglevel = usbnet_get_msglevel,
- .set_msglevel = usbnet_set_msglevel,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
- .get_ts_info = ethtool_op_get_ts_info,
-+#endif
- };
-
- /*-------------------------------------------------------------------------*/
diff --git a/patches/collateral-evolutions/network/0017-get_ts_info/get_ts_info.cocci b/patches/collateral-evolutions/network/0017-get_ts_info/get_ts_info.cocci
new file mode 100644
index 0000000..3e023a3
--- /dev/null
+++ b/patches/collateral-evolutions/network/0017-get_ts_info/get_ts_info.cocci
@@ -0,0 +1,19 @@
+@r1@
+identifier s, func;
+@@
+
+struct ethtool_ops s = {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+.get_ts_info = func,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
+};
+
+// ----------------------------------------------------------------------
+
+@@
+identifier r1.func;
+@@
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+func(...) { ... }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
diff --git a/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch b/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch
deleted file mode 100644
index 4aef54c..0000000
--- a/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
-+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2352,6 +2352,7 @@ static void igb_get_strings(struct net_d
- }
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- static int igb_get_ts_info(struct net_device *dev,
- struct ethtool_ts_info *info)
- {
-@@ -2407,6 +2408,7 @@ static int igb_get_ts_info(struct net_de
- return -EOPNOTSUPP;
- }
- }
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
-
- static int igb_get_rss_hash_opts(struct igb_adapter *adapter,
- struct ethtool_rxnfc *cmd)
-@@ -3042,7 +3044,9 @@ static const struct ethtool_ops igb_etht
- .get_ethtool_stats = igb_get_ethtool_stats,
- .get_coalesce = igb_get_coalesce,
- .set_coalesce = igb_set_coalesce,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- .get_ts_info = igb_get_ts_info,
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
- .get_rxnfc = igb_get_rxnfc,
- .set_rxnfc = igb_set_rxnfc,
- .get_eee = igb_get_eee,
--
2.1.0
next prev parent reply other threads:[~2015-02-25 14:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 14:20 [PATCH 00/10] backports: replace igb patches with generic cocci patches Stefan Assmann
2015-02-25 14:20 ` Stefan Assmann [this message]
2015-02-25 14:20 ` [PATCH 02/10] backports: replace struct ethtool_ops get/set_eee changes with smpl patch Stefan Assmann
2015-02-25 14:20 ` [PATCH 03/10] backports: replace struct ethtool_ops get_module " Stefan Assmann
2015-02-25 14:20 ` [PATCH 04/10] backports: replace struct pci_driver sriov_configure " Stefan Assmann
2015-02-25 14:20 ` [PATCH 05/10] backports: replace struct pci_error_handlers " Stefan Assmann
2015-02-25 14:20 ` [PATCH 06/10] backports: replace struct ethtool_ops get_rxnfc " Stefan Assmann
2015-02-25 14:20 ` [PATCH 07/10] backports: replace struct net_device_ops set_vf_spoofchk " Stefan Assmann
2015-02-25 14:20 ` [PATCH 08/10] backports: replace struct net_device_ops set_vf_rate " Stefan Assmann
2015-02-25 14:20 ` [PATCH 09/10] backports: remove devm_hwmon_device_register_with_groups references " Stefan Assmann
2015-04-21 20:44 ` Hauke Mehrtens
2015-04-22 14:58 ` Stefan Assmann
2015-02-25 14:20 ` [PATCH 10/10] backports: require coccinelle version 1.0.0-rc24 Stefan Assmann
2015-04-20 21:27 ` Hauke Mehrtens
2015-04-21 6:16 ` Johannes Berg
2015-04-21 6:30 ` Stefan Assmann
2015-04-25 14:00 ` [PATCH 00/10] backports: replace igb patches with generic cocci patches Hauke Mehrtens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424874054-22956-2-git-send-email-sassmann@kpanic.de \
--to=sassmann@kpanic.de \
--cc=backports@vger.kernel.org \
--cc=hauke@hauke-m.de \
--cc=mcgrof@do-not-panic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox