* [PATCH] move include lines out of include file
@ 2010-10-22 0:51 Jim Rees
2010-10-24 12:02 ` Boaz Harrosh
0 siblings, 1 reply; 4+ messages in thread
From: Jim Rees @ 2010-10-22 0:51 UTC (permalink / raw)
To: Benny Halevy; +Cc: linux-nfs, peter honeyman
Signed-off-by: Jim Rees <rees@umich.edu>
---
include/linux/sunrpc/simple_rpc_pipefs.h | 6 ------
net/sunrpc/simple_rpc_pipefs.c | 5 +++++
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/include/linux/sunrpc/simple_rpc_pipefs.h b/include/linux/sunrpc/simple_rpc_pipefs.h
index 02e8147..f6a1227 100644
--- a/include/linux/sunrpc/simple_rpc_pipefs.h
+++ b/include/linux/sunrpc/simple_rpc_pipefs.h
@@ -39,14 +39,8 @@
#ifndef _SIMPLE_RPC_PIPEFS_H_
#define _SIMPLE_RPC_PIPEFS_H_
-#include <linux/fs.h>
-#include <linux/list.h>
-#include <linux/mount.h>
-#include <linux/sched.h>
-#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
-
#define payload_of(headerp) ((void *)(headerp + 1))
/*
diff --git a/net/sunrpc/simple_rpc_pipefs.c b/net/sunrpc/simple_rpc_pipefs.c
index c9306aa..b749cf7 100644
--- a/net/sunrpc/simple_rpc_pipefs.c
+++ b/net/sunrpc/simple_rpc_pipefs.c
@@ -41,6 +41,11 @@
#include <linux/completion.h>
#include <linux/uaccess.h>
#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/list.h>
+#include <linux/mount.h>
+#include <linux/sched.h>
+#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/simple_rpc_pipefs.h>
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] move include lines out of include file
2010-10-22 0:51 [PATCH] move include lines out of include file Jim Rees
@ 2010-10-24 12:02 ` Boaz Harrosh
2010-10-24 15:35 ` Jim Rees
0 siblings, 1 reply; 4+ messages in thread
From: Boaz Harrosh @ 2010-10-24 12:02 UTC (permalink / raw)
To: Jim Rees; +Cc: Benny Halevy, linux-nfs, peter honeyman
On 10/22/2010 02:51 AM, Jim Rees wrote:
> Signed-off-by: Jim Rees <rees@umich.edu>
> ---
> include/linux/sunrpc/simple_rpc_pipefs.h | 6 ------
> net/sunrpc/simple_rpc_pipefs.c | 5 +++++
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/sunrpc/simple_rpc_pipefs.h b/include/linux/sunrpc/simple_rpc_pipefs.h
> index 02e8147..f6a1227 100644
> --- a/include/linux/sunrpc/simple_rpc_pipefs.h
> +++ b/include/linux/sunrpc/simple_rpc_pipefs.h
> @@ -39,14 +39,8 @@
> #ifndef _SIMPLE_RPC_PIPEFS_H_
> #define _SIMPLE_RPC_PIPEFS_H_
>
> -#include <linux/fs.h>
> -#include <linux/list.h>
> -#include <linux/mount.h>
> -#include <linux/sched.h>
> -#include <linux/sunrpc/clnt.h>
> #include <linux/sunrpc/rpc_pipe_fs.h>
>
> -
> #define payload_of(headerp) ((void *)(headerp + 1))
>
> /*
> diff --git a/net/sunrpc/simple_rpc_pipefs.c b/net/sunrpc/simple_rpc_pipefs.c
> index c9306aa..b749cf7 100644
> --- a/net/sunrpc/simple_rpc_pipefs.c
> +++ b/net/sunrpc/simple_rpc_pipefs.c
> @@ -41,6 +41,11 @@
> #include <linux/completion.h>
> #include <linux/uaccess.h>
> #include <linux/module.h>
> +#include <linux/fs.h>
> +#include <linux/list.h>
> +#include <linux/mount.h>
> +#include <linux/sched.h>
> +#include <linux/sunrpc/clnt.h>
> #include <linux/sunrpc/simple_rpc_pipefs.h>
>
This patch does *not* break the header's independence. .i.e
the header can still be compiled independently without any other
includes. Which means some of the includes here are un-needed.
See patch below. (Please squash it into your patch)
Boaz
---
git diff --stat -p -M net/sunrpc/simple_rpc_pipefs.c
net/sunrpc/simple_rpc_pipefs.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/net/sunrpc/simple_rpc_pipefs.c b/net/sunrpc/simple_rpc_pipefs.c
index c4825b7..24e2277 100644
--- a/net/sunrpc/simple_rpc_pipefs.c
+++ b/net/sunrpc/simple_rpc_pipefs.c
@@ -38,13 +38,7 @@
* With thanks to CITI's project sponsor and partner, IBM.
*/
-#include <linux/completion.h>
-#include <linux/uaccess.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/list.h>
#include <linux/mount.h>
-#include <linux/sched.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/simple_rpc_pipefs.h>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] move include lines out of include file
2010-10-24 12:02 ` Boaz Harrosh
@ 2010-10-24 15:35 ` Jim Rees
2010-10-25 11:41 ` Benny Halevy
0 siblings, 1 reply; 4+ messages in thread
From: Jim Rees @ 2010-10-24 15:35 UTC (permalink / raw)
To: Boaz Harrosh; +Cc: Benny Halevy, linux-nfs, peter honeyman
Boaz Harrosh wrote:
This patch does *not* break the header's independence. .i.e the header can
still be compiled independently without any other includes. Which means
some of the includes here are un-needed.
Thanks! I tried removing all the includes but was too lazy to figure out
which one was really needed by simple_rpc_pipefs.c.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] move include lines out of include file
2010-10-24 15:35 ` Jim Rees
@ 2010-10-25 11:41 ` Benny Halevy
0 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2010-10-25 11:41 UTC (permalink / raw)
To: Jim Rees, Boaz Harrosh; +Cc: linux-nfs, peter honeyman
On 2010-10-24 17:35, Jim Rees wrote:
> Boaz Harrosh wrote:
>
> This patch does *not* break the header's independence. .i.e the header can
> still be compiled independently without any other includes. Which means
> some of the includes here are un-needed.
>
> Thanks! I tried removing all the includes but was too lazy to figure out
> which one was really needed by simple_rpc_pipefs.c.
Yup.
The self-sustainability approach is the best one, i.e. header files
should include the minimum number of other header files to satisfy their
dependencies.
I'll merge both patches squashed together then.
Benny
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-25 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 0:51 [PATCH] move include lines out of include file Jim Rees
2010-10-24 12:02 ` Boaz Harrosh
2010-10-24 15:35 ` Jim Rees
2010-10-25 11:41 ` Benny Halevy
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).