mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "James C. Georgas" <jgeorgas@rogers.com>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@redhat.com>
Subject: Inclusion order patch
Date: Fri, 05 Aug 2005 22:52:49 -0400	[thread overview]
Message-ID: <1123296769.17282.36.camel@Tachyon.home> (raw)
In-Reply-To: <1123295768.17282.29.camel@Tachyon.home>

Excuse me for reposting this. I forgot the subject line. hehe.

This patch lets this header stand alone, since I can never remember
which other headers to include, or in which order.

The three #include lines define the types: kobject, list_head and dev_t,
which are used in the cdev structure.

The forward declaration of struct inode is to quiet the following
compiler warning when including only cdev.h in my file:

include/linux/cdev.h:30: warning: `struct inode' declared inside parameter list
include/linux/cdev.h:30: warning: its scope is only this definition or
declaration, which is probably not what you want

I'm not sure, but I think it's saying that I'm declaring a new struct,
which will not be the same as the real struct inode if it is #included
later, because of the scope rules.

(oh yeah, this is my first patch to the list; did I get the format
right?)

BEGIN PATCH:

diff -Nru linux-2.6.12.4/include/linux/cdev.h linux/include/linux/cdev.h
--- linux-2.6.12.4/include/linux/cdev.h 2005-08-05 03:04:37.000000000
-0400
+++ linux/include/linux/cdev.h  2005-08-05 21:41:39.000000000 -0400
@@ -2,6 +2,12 @@
 #define _LINUX_CDEV_H
 #ifdef __KERNEL__

+#include <linux/kobject.h>
+#include <linux/list.h>
+#include <linux/types.h>
+
+struct inode;
+
 struct cdev {
        struct kobject kobj;
        struct module *owner;



-- 
James C. Georgas <jgeorgas@rogers.com>


  reply	other threads:[~2005-08-06  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-06  2:36 James C. Georgas
2005-08-06  2:52 ` James C. Georgas [this message]
2005-08-08  7:18   ` Inclusion order patch Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1123296769.17282.36.camel@Tachyon.home \
    --to=jgeorgas@rogers.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®