* [PATCH] freezer.h uses task_struct fields
@ 2006-12-08 6:13 Randy Dunlap
2006-12-08 14:31 ` Dave Kleikamp
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2006-12-08 6:13 UTC (permalink / raw)
To: lkml; +Cc: akpm
From: Randy Dunlap <randy.dunlap@oracle.com>
freezer.h uses task_struct fields so it should include sched.h.
CC [M] fs/jfs/jfs_txnmgr.o
In file included from fs/jfs/jfs_txnmgr.c:49:
include/linux/freezer.h: In function 'frozen':
include/linux/freezer.h:9: error: dereferencing pointer to incomplete type
include/linux/freezer.h:9: error: 'PF_FROZEN' undeclared (first use in this function)
include/linux/freezer.h:9: error: (Each undeclared identifier is reported only once
include/linux/freezer.h:9: error: for each function it appears in.)
include/linux/freezer.h: In function 'freezing':
include/linux/freezer.h:17: error: dereferencing pointer to incomplete type
include/linux/freezer.h:17: error: 'PF_FREEZE' undeclared (first use in this function)
include/linux/freezer.h: In function 'freeze':
include/linux/freezer.h:26: error: dereferencing pointer to incomplete type
include/linux/freezer.h:26: error: 'PF_FREEZE' undeclared (first use in this function)
include/linux/freezer.h: In function 'do_not_freeze':
include/linux/freezer.h:34: error: dereferencing pointer to incomplete type
include/linux/freezer.h:34: error: 'PF_FREEZE' undeclared (first use in this function)
include/linux/freezer.h: In function 'thaw_process':
include/linux/freezer.h:43: error: dereferencing pointer to incomplete type
include/linux/freezer.h:43: error: 'PF_FROZEN' undeclared (first use in this function)
include/linux/freezer.h:44: warning: implicit declaration of function 'wake_up_process'
include/linux/freezer.h: In function 'frozen_process':
include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
include/linux/freezer.h:55: error: 'PF_FREEZE' undeclared (first use in this function)
include/linux/freezer.h:55: error: 'PF_FROZEN' undeclared (first use in this function)
fs/jfs/jfs_txnmgr.c: In function 'freezing':
include/linux/freezer.h:18: warning: control reaches end of non-void function
make[2]: *** [fs/jfs/jfs_txnmgr.o] Error 1
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
include/linux/freezer.h | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.19-git11.orig/include/linux/freezer.h
+++ linux-2.6.19-git11/include/linux/freezer.h
@@ -1,5 +1,7 @@
/* Freezer declarations */
+#include <linux/sched.h>
+
#ifdef CONFIG_PM
/*
* Check if a process has been frozen
---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] freezer.h uses task_struct fields
2006-12-08 6:13 [PATCH] freezer.h uses task_struct fields Randy Dunlap
@ 2006-12-08 14:31 ` Dave Kleikamp
2006-12-08 14:52 ` Dave Kleikamp
2006-12-08 21:01 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Dave Kleikamp @ 2006-12-08 14:31 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, akpm
On Thu, 2006-12-07 at 22:13 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> freezer.h uses task_struct fields so it should include sched.h.
>
> CC [M] fs/jfs/jfs_txnmgr.o
> In file included from fs/jfs/jfs_txnmgr.c:49:
> include/linux/freezer.h: In function 'frozen':
> include/linux/freezer.h:9: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:9: error: 'PF_FROZEN' undeclared (first use in this function)
> include/linux/freezer.h:9: error: (Each undeclared identifier is reported only once
> include/linux/freezer.h:9: error: for each function it appears in.)
> include/linux/freezer.h: In function 'freezing':
> include/linux/freezer.h:17: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:17: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'freeze':
> include/linux/freezer.h:26: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:26: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'do_not_freeze':
> include/linux/freezer.h:34: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:34: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'thaw_process':
> include/linux/freezer.h:43: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:43: error: 'PF_FROZEN' undeclared (first use in this function)
> include/linux/freezer.h:44: warning: implicit declaration of function 'wake_up_process'
> include/linux/freezer.h: In function 'frozen_process':
> include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:55: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h:55: error: 'PF_FROZEN' undeclared (first use in this function)
> fs/jfs/jfs_txnmgr.c: In function 'freezing':
> include/linux/freezer.h:18: warning: control reaches end of non-void function
> make[2]: *** [fs/jfs/jfs_txnmgr.o] Error 1
Defining CONFIG_SMP or CONFIG_PREEMPT masks this problem (at least in
jfs), since smp_lock.h will include sched.h when CONFIG_LOCK_KERNEL is
defined, and smp_lock.h happens to be included by jfs_txngmr.c before
freezer.h.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> ---
> include/linux/freezer.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-2.6.19-git11.orig/include/linux/freezer.h
> +++ linux-2.6.19-git11/include/linux/freezer.h
> @@ -1,5 +1,7 @@
> /* Freezer declarations */
>
> +#include <linux/sched.h>
> +
> #ifdef CONFIG_PM
> /*
> * Check if a process has been frozen
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] freezer.h uses task_struct fields
2006-12-08 14:31 ` Dave Kleikamp
@ 2006-12-08 14:52 ` Dave Kleikamp
2006-12-08 21:01 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Dave Kleikamp @ 2006-12-08 14:52 UTC (permalink / raw)
Cc: Randy Dunlap, lkml, akpm
Sorry. I had a misconfiguration in my mail client. My correct address
is shaggy@linux.vnet.ibm.com, not ...@ltc.vnet...
Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] freezer.h uses task_struct fields
2006-12-08 14:31 ` Dave Kleikamp
2006-12-08 14:52 ` Dave Kleikamp
@ 2006-12-08 21:01 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2006-12-08 21:01 UTC (permalink / raw)
To: Dave Kleikamp; +Cc: Randy Dunlap, lkml
On Fri, 08 Dec 2006 08:31:11 -0600
Dave Kleikamp <shaggy@ltc.vnet.ibm.com> wrote:
> > include/linux/freezer.h: In function 'frozen_process':
> > include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> > include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> > include/linux/freezer.h:55: error: 'PF_FREEZE' undeclared (first use in this function)
> > include/linux/freezer.h:55: error: 'PF_FROZEN' undeclared (first use in this function)
> > fs/jfs/jfs_txnmgr.c: In function 'freezing':
> > include/linux/freezer.h:18: warning: control reaches end of non-void function
> > make[2]: *** [fs/jfs/jfs_txnmgr.o] Error 1
>
> Defining CONFIG_SMP or CONFIG_PREEMPT masks this problem (at least in
> jfs), since smp_lock.h will include sched.h when CONFIG_LOCK_KERNEL is
> defined, and smp_lock.h happens to be included by jfs_txngmr.c before
> freezer.h.
>
> >
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>
> Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
OK, thanks guys. This is the sort of patch which I like to put
through a decent round of cross-compilation testing, so it's unlikely
to appear in mainline for 2-3 days.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-08 21:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-08 6:13 [PATCH] freezer.h uses task_struct fields Randy Dunlap
2006-12-08 14:31 ` Dave Kleikamp
2006-12-08 14:52 ` Dave Kleikamp
2006-12-08 21:01 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®