* [PATCH] srcu: add missing header file
@ 2010-04-17 11:13 Lai Jiangshan
2010-04-18 1:06 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2010-04-17 11:13 UTC (permalink / raw)
To: Paul E. McKenney, Tejun Heo, LKML, Ingo Molnar, Andrew Morton
When I was writing a module, I hit this compile error.
include/linux/srcu.h:39: error: field 'mutex' has incomplete type
include/linux/srcu.h:41: error: field 'dep_map' has incomplete type
mutex.h is missed in srcu.h, but srcu.h uses struct mutex,
so this patch adds this missing header file.
__percpu is defined in compiler.h which is included in mutex.h already.
But I also include percpu.h because it names "__percpu".
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 4d5ecb2..675a16f 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -27,6 +27,9 @@
#ifndef _LINUX_SRCU_H
#define _LINUX_SRCU_H
+#include <linux/percpu.h>
+#include <linux/mutex.h>
+
struct srcu_struct_array {
int c[2];
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] srcu: add missing header file
2010-04-17 11:13 [PATCH] srcu: add missing header file Lai Jiangshan
@ 2010-04-18 1:06 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2010-04-18 1:06 UTC (permalink / raw)
To: Lai Jiangshan; +Cc: Tejun Heo, LKML, Ingo Molnar, Andrew Morton
On Sat, Apr 17, 2010 at 07:13:53PM +0800, Lai Jiangshan wrote:
>
> When I was writing a module, I hit this compile error.
> include/linux/srcu.h:39: error: field 'mutex' has incomplete type
> include/linux/srcu.h:41: error: field 'dep_map' has incomplete type
>
> mutex.h is missed in srcu.h, but srcu.h uses struct mutex,
> so this patch adds this missing header file.
>
> __percpu is defined in compiler.h which is included in mutex.h already.
> But I also include percpu.h because it names "__percpu".
Good catch!!! Queued for 2.6.35.
Thanx, Paul
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> index 4d5ecb2..675a16f 100644
> --- a/include/linux/srcu.h
> +++ b/include/linux/srcu.h
> @@ -27,6 +27,9 @@
> #ifndef _LINUX_SRCU_H
> #define _LINUX_SRCU_H
>
> +#include <linux/percpu.h>
> +#include <linux/mutex.h>
> +
> struct srcu_struct_array {
> int c[2];
> };
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-18 1:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-17 11:13 [PATCH] srcu: add missing header file Lai Jiangshan
2010-04-18 1:06 ` Paul E. McKenney
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).