diff mbox series

[8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params

Message ID 20200420221615.14734-9-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to version 5.7-rc2 | expand

Commit Message

Hauke Mehrtens April 20, 2020, 10:16 p.m. UTC
The supported_coalesce_params member was added to the struct ethtool_ops
in upstream commit 95cddcb5cc20 ("ethtool: add infrastructure for
centralized checking of coalescing parameters"). This prevents the usage
in kernel < 5.7.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0096-ethtool-supported_coalesce_params.cocci | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 patches/0096-ethtool-supported_coalesce_params.cocci
diff mbox series

Patch

diff --git a/patches/0096-ethtool-supported_coalesce_params.cocci b/patches/0096-ethtool-supported_coalesce_params.cocci
new file mode 100644
index 00000000..9b1b090e
--- /dev/null
+++ b/patches/0096-ethtool-supported_coalesce_params.cocci
@@ -0,0 +1,9 @@ 
+@r@
+identifier s,expr;
+@@
+
+struct ethtool_ops s = {
++#if LINUX_VERSION_IS_GEQ(5,7,0)
+	.supported_coalesce_params = expr,
++#endif
+};