diff mbox series

[20/20] lnet: include linux/ethtool.h

Message ID 1633974049-26490-21-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS Oct 11, 2021 | expand

Commit Message

James Simmons Oct. 11, 2021, 5:40 p.m. UTC
From: Jian Yu <yujian@whamcloud.com>

Kernel 5.11+ removes including linux/ethtool.h from
linux/netdevice.h, which caused the following build error:

dereferencing pointer to incomplete type 'const struct ethtool_ops'

This patch fixes the above issue by adding the include into
the file that uses the structure.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15052
Lustre-commit: b2503cf65a0cb3583 ("LU-15052 lnet: include linux/ethtool.h")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45109
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/klnds/o2iblnd/o2iblnd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/lnet/klnds/o2iblnd/o2iblnd.c b/net/lnet/klnds/o2iblnd/o2iblnd.c
index fd807c2..36d26b2 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/net/lnet/klnds/o2iblnd/o2iblnd.c
@@ -36,9 +36,11 @@ 
 
 #include <asm/div64.h>
 #include <asm/page.h>
-#include "o2iblnd.h"
+#include <linux/ethtool.h>
 #include <linux/inetdevice.h>
 
+#include "o2iblnd.h"
+
 static struct lnet_lnd the_o2iblnd;
 
 struct kib_data kiblnd_data;