From: Andrew Morton <akpm@osdl.org>
To: Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] fix remaining missing includes
Date: Fri, 4 Nov 2005 23:29:54 -0800 [thread overview]
Message-ID: <20051104232954.6145d309.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0511041746470.4856@gans.physik3.uni-rostock.de>
Tim Schmielau <tim@physik3.uni-rostock.de> wrote:
>
> /* Encode and de-code a swap entry */
> @@ -464,6 +464,7 @@ static inline int ptep_test_and_clear_di
>
> extern spinlock_t pa_dbit_lock;
>
> +struct mm_struct;
Generally, it's better to put these forward struct declarations right at
the top of the header file (after the nested includes).
Because if someone comes along later and adds some code which uses
mm_struct at line 300, he's going to say a rude word and then add a second
forward declaration at line 299, and we end up with two of them. Or he's
more awake and he just moves your declaration. Either way, putting it at
the top of the file eliminates the problem.
A followup patch sometime would be nice..
next prev parent reply other threads:[~2005-11-05 7:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 16:56 Tim Schmielau
2005-11-04 17:00 ` [PATCH 2/2] Don't include sched.h from module.h Tim Schmielau
2005-11-05 7:29 ` Andrew Morton [this message]
2005-11-05 7:53 ` [PATCH 1/2] fix remaining missing includes Tim Schmielau
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=20051104232954.6145d309.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@physik3.uni-rostock.de \
/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®