* [PATCH -next] net/ipv4/datagram.c: remove superfluous header files from datagram.c
@ 2021-09-28 17:49 Mianhan Liu
2021-09-29 0:41 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Mianhan Liu @ 2021-09-28 17:49 UTC (permalink / raw)
To: David S. Miller, Hideaki YOSHIFUJI, David Ahern
Cc: Jakub Kicinski, netdev, linux-kernel, Mianhan Liu
datagram.c hasn't use any macro or function declared in linux/ip.h,
and linux/module.h.
Thus, these files can be removed from datagram.c safely without
affecting the compilation of the net/ipv4 module
Signed-off-by: Mianhan Liu <liumh1@shanghaitech.edu.cn>
---
net/ipv4/datagram.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c
index 4a8550c49..2dc5f1890 100644
--- a/net/ipv4/datagram.c
+++ b/net/ipv4/datagram.c
@@ -8,8 +8,6 @@
*/
#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/ip.h>
#include <linux/in.h>
#include <net/ip.h>
#include <net/sock.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net/ipv4/datagram.c: remove superfluous header files from datagram.c
2021-09-28 17:49 [PATCH -next] net/ipv4/datagram.c: remove superfluous header files from datagram.c Mianhan Liu
@ 2021-09-29 0:41 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-09-29 0:41 UTC (permalink / raw)
To: Mianhan Liu
Cc: David S. Miller, Hideaki YOSHIFUJI, David Ahern, netdev, linux-kernel
On Wed, 29 Sep 2021 01:49:43 +0800 Mianhan Liu wrote:
> datagram.c hasn't use any macro or function declared in linux/ip.h,
> and linux/module.h.
> Thus, these files can be removed from datagram.c safely without
> affecting the compilation of the net/ipv4 module
>
> Signed-off-by: Mianhan Liu <liumh1@shanghaitech.edu.cn>
>
> ---
> net/ipv4/datagram.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c
> index 4a8550c49..2dc5f1890 100644
> --- a/net/ipv4/datagram.c
> +++ b/net/ipv4/datagram.c
> @@ -8,8 +8,6 @@
> */
>
> #include <linux/types.h>
> -#include <linux/module.h>
If we remove this one we need to add an include for linux/export.h
> -#include <linux/ip.h>
This indeed looks unnecessary.
> #include <linux/in.h>
> #include <net/ip.h>
> #include <net/sock.h>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-29 0:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 17:49 [PATCH -next] net/ipv4/datagram.c: remove superfluous header files from datagram.c Mianhan Liu
2021-09-29 0:41 ` Jakub Kicinski
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).