lkml.org 
[lkml]   [2005]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] fix remaining missing includes
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..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-05 08:32    [W:1.257 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site