netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] wwan: Replace kernel.h with the necessary inclusions
@ 2021-12-22 16:32 Andy Shevchenko
  2021-12-22 20:38 ` Sergey Ryazanov
  2021-12-23 11:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-22 16:32 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel
  Cc: Loic Poulain, Sergey Ryazanov, Johannes Berg, Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/wwan.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/wwan.h b/include/linux/wwan.h
index e143c88bf4b0..afb3334ec8c5 100644
--- a/include/linux/wwan.h
+++ b/include/linux/wwan.h
@@ -4,12 +4,9 @@
 #ifndef __WWAN_H
 #define __WWAN_H
 
-#include <linux/device.h>
-#include <linux/kernel.h>
 #include <linux/poll.h>
-#include <linux/skbuff.h>
-#include <linux/netlink.h>
 #include <linux/netdevice.h>
+#include <linux/types.h>
 
 /**
  * enum wwan_port_type - WWAN port types
@@ -37,6 +34,10 @@ enum wwan_port_type {
 	WWAN_PORT_UNKNOWN,
 };
 
+struct device;
+struct file;
+struct netlink_ext_ack;
+struct sk_buff;
 struct wwan_port;
 
 /** struct wwan_port_ops - The WWAN port operations
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-23 11:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-22 16:32 [PATCH v1 1/1] wwan: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-12-22 20:38 ` Sergey Ryazanov
2021-12-23 10:14   ` Andy Shevchenko
2021-12-23 10:16     ` Andy Shevchenko
2021-12-23 10:46       ` Sergey Ryazanov
2021-12-23 11:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).