LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] cdev.h needs struct inode; add forward declaration
@ 2007-01-29 20:01 Josh Triplett
2007-01-30 10:48 ` Jan Engelhardt
0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2007-01-29 20:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
include/linux/cdev.h defines cd_forget to take a struct inode *, but does not
pull in any definition or declaration for struct inode. This generates a
compiler warning if a source file pulls in cdev.h without first pulling in
fs.h. Add a forward declaration of struct inode to cdev.h, to eliminate the
compiler warning and preserve the ability to include headers in any arbitrary
order.
Signed-off-by: Josh Triplett <josh@kernel.org>
---
include/linux/cdev.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/cdev.h b/include/linux/cdev.h
index f309b00..4281e80 100644
--- a/include/linux/cdev.h
+++ b/include/linux/cdev.h
@@ -6,6 +6,8 @@
#include <linux/kdev_t.h>
#include <linux/list.h>
+struct inode;
+
struct cdev {
struct kobject kobj;
struct module *owner;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cdev.h needs struct inode; add forward declaration
2007-01-29 20:01 [PATCH] cdev.h needs struct inode; add forward declaration Josh Triplett
@ 2007-01-30 10:48 ` Jan Engelhardt
0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2007-01-30 10:48 UTC (permalink / raw)
To: Josh Triplett; +Cc: linux-kernel, Andrew Morton
>include/linux/cdev.h defines cd_forget to take a struct inode *, but does not
>pull in any definition or declaration for struct inode. This generates a
>compiler warning if a source file pulls in cdev.h without first pulling in
>fs.h. Add a forward declaration of struct inode to cdev.h, to eliminate the
>compiler warning and preserve the ability to include headers in any arbitrary
>order.
We've been over this: http://lkml.org/lkml/2007/1/19/119
The patch went in into -mm and out again (why? - no reason was
attached, Andrew.)
Jan
--
ft: http://freshmeat.net/p/chaostables/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-30 10:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-29 20:01 [PATCH] cdev.h needs struct inode; add forward declaration Josh Triplett
2007-01-30 10:48 ` Jan Engelhardt
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).