lkml.org 
[lkml]   [2008]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Circular include dependencies
On Fri, 23 May 2008 14:20:34 +0100 Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> Hi,
>
> Having discovered some circular include dependencies in the ARM header
> files which were causing build issues, I created a script to walk ARM
> includes and report any similar issues found - which includes traversing
> any referenced linux/ includes.
>
> It identified the following two in include/linux/:
>
> linux/mmzone.h <- linux/memory_hotplug.h <- linux/mmzone.h
> linux/mmzone.h <- linux/topology.h <- linux/mmzone.h
>
> Checking them by hand reveals that these are real. Whether they're
> capable of causing a problem or not, I'm not going to comment on.
> However, they're not a good idea and someone should probably look at
> resolving the loops.

(cc's added).

Thanks.

I'm not sure who we could tap for the topology.h one.

A suitable (and often good) way of solving this is to identify the
things which a.h needs from b.h and hoist them out into a new c.h and
include that from both a.h and b.h.



\
 
 \ /
  Last update: 2008-05-24 03:21    [W:0.054 / U:3.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site