From: Felipe Balbi <balbi@ti.com>
To: David Cohen <dacohen@gmail.com>
Cc: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>,
balbi@ti.com, Thomas Weber <weber@corscience.de>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-omap@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Hans Verkuil <hverkuil@xs4all.nl>, Tejun Heo <tj@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend] video: omap24xxcam: Fix compilation
Date: Sat, 19 Feb 2011 17:00:25 +0200 [thread overview]
Message-ID: <20110219150024.GA4487@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <AANLkTik+6fguqgH8Bpnpqo7Axmquy3caRMELTZVmuN1j@mail.gmail.com>
Hi,
On Sat, Feb 19, 2011 at 01:35:09PM +0200, David Cohen wrote:
> >> aha, now I get it, so shouldn't the real fix be including <linux/sched.h>
> >> on <linux/wait.h>, I mean, it's <linuux/wait.h> who uses a symbol
> >> defined in <linux/sched.h>, right ?
>
> That's a tricky situation. linux/sched.h includes indirectly
> linux/completion.h which includes linux/wait.h.
Ok, so the real problem is that there is circular dependency between
<linux/sched.h> and <linux/wait.h>
> By including sched.h in wait.h, the side effect is completion.h will
> then include a blank wait.h file and trigger a compilation error every
> time wait.h is included by any file.
true, but the real problem is the circular dependency between those
files.
> > Surprisingly many other files still don't seem to be affected. But this
> > is actually a better solution (to include sched.h in wait.h).
>
> It does not affect all files include wait.h because TASK_* macros are
> used with #define statements only. So it has no effect unless some
> file tries to use a macro which used TASK_*. It seems the usual on
> kernel is to include both wait.h and sched.h when necessary.
> IMO your patch is fine.
I have to disagree. The fundamental problem is the circular dependency
between those two files:
sched.h uses wait_queue_head_t defined in wait.h
wait.h uses TASK_* defined in sched.h
So, IMO the real fix would be clear out the circular dependency. Maybe
introducing <linux/task.h> to define those TASK_* symbols and include
that on sched.h and wait.h
Just dig a quick and dirty to try it out and works like a charm
--
balbi
next prev parent reply other threads:[~2011-02-19 15:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 8:49 [PATCH resend] video: omap24xxcam: Fix compilation Thomas Weber
2011-02-07 16:15 ` Randy Dunlap
2011-02-15 11:28 ` Sakari Ailus
2011-02-15 11:37 ` Felipe Balbi
2011-02-15 11:44 ` Sylwester Nawrocki
2011-02-15 11:47 ` Felipe Balbi
2011-02-15 11:49 ` Sakari Ailus
2011-02-15 11:50 ` Thomas Weber
2011-02-15 11:53 ` Felipe Balbi
2011-02-15 12:17 ` Sakari Ailus
2011-02-19 11:35 ` David Cohen
2011-02-19 15:00 ` Felipe Balbi [this message]
2011-02-19 16:04 ` David Cohen
2011-02-21 7:36 ` Felipe Balbi
2011-02-21 12:09 ` David Cohen
2011-02-21 12:21 ` Felipe Balbi
2011-02-24 23:36 ` David Cohen
2011-02-25 6:59 ` Thomas Weber
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=20110219150024.GA4487@legolas.emea.dhcp.ti.com \
--to=balbi@ti.com \
--cc=dacohen@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@maxwell.research.nokia.com \
--cc=tj@kernel.org \
--cc=weber@corscience.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;
as well as URLs for NNTP newsgroup(s).