LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* request_queue_t depends on CONFIG_BLOCK
@ 2007-03-22 21:52 Olaf Hering
2007-03-22 21:53 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2007-03-22 21:52 UTC (permalink / raw)
To: linux-kernel, linux-ide
How can this compile error be fixed properly?
request_queue_t is inside CONFIG_BLOCK,
ide_drive_s (and likely others) use it unconditionally.
CC arch/powerpc/kernel/setup_64.o
In file included from linux-2.6.21-rc4/arch/powerpc/kernel/setup_64.c:23:
linux-2.6.21-rc4/include/linux/ide.h:556: error: expected specifier-qualifier-list before 'request_queue_t'
linux-2.6.21-rc4/include/linux/ide.h:695: warning: 'struct request' declared inside parameter list
linux-2.6.21-rc4/include/linux/ide.h:695: warning: its scope is only this definition or declaration, which is probably not what you want
linux-2.6.21-rc4/include/linux/ide.h:823: warning: 'struct request' declared inside parameter list
linux-2.6.21-rc4/include/linux/ide.h:856: error: field 'wrq' has incomplete type
linux-2.6.21-rc4/include/linux/ide.h:1199: error: expected ')' before '*' token
make[2]: *** [arch/powerpc/kernel/setup_64.o] Error 1
CC arch/powerpc/kernel/setup-common.o
In file included from linux-2.6.21-rc4/arch/powerpc/kernel/setup-common.c:24:
linux-2.6.21-rc4/include/linux/ide.h:556: error: expected specifier-qualifier-list before 'request_queue_t'
linux-2.6.21-rc4/include/linux/ide.h:695: warning: 'struct request' declared inside parameter list
linux-2.6.21-rc4/include/linux/ide.h:695: warning: its scope is only this definition or declaration, which is probably not what you want
linux-2.6.21-rc4/include/linux/ide.h:823: warning: 'struct request' declared inside parameter list
linux-2.6.21-rc4/include/linux/ide.h:856: error: field 'wrq' has incomplete type
linux-2.6.21-rc4/include/linux/ide.h:1199: error: expected ')' before '*' token
make[2]: *** [arch/powerpc/kernel/setup-common.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [arch/powerpc/kernel] Error 2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: request_queue_t depends on CONFIG_BLOCK
2007-03-22 21:52 request_queue_t depends on CONFIG_BLOCK Olaf Hering
@ 2007-03-22 21:53 ` Christoph Hellwig
2007-03-23 0:10 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2007-03-22 21:53 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-kernel, linux-ide
On Thu, Mar 22, 2007 at 10:52:34PM +0100, Olaf Hering wrote:
> How can this compile error be fixed properly?
> request_queue_t is inside CONFIG_BLOCK,
> ide_drive_s (and likely others) use it unconditionally.
>
>
> CC arch/powerpc/kernel/setup_64.o
> In file included from linux-2.6.21-rc4/arch/powerpc/kernel/setup_64.c:23:
start looking for the problem here. Why does you arch code include ide.h?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: request_queue_t depends on CONFIG_BLOCK
2007-03-22 21:53 ` Christoph Hellwig
@ 2007-03-23 0:10 ` Olaf Hering
2007-03-23 18:29 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2007-03-23 0:10 UTC (permalink / raw)
To: Christoph Hellwig, linux-kernel, linux-ide
On Thu, Mar 22, Christoph Hellwig wrote:
> On Thu, Mar 22, 2007 at 10:52:34PM +0100, Olaf Hering wrote:
> > How can this compile error be fixed properly?
> > request_queue_t is inside CONFIG_BLOCK,
> > ide_drive_s (and likely others) use it unconditionally.
> >
> >
> > CC arch/powerpc/kernel/setup_64.o
> > In file included from linux-2.6.21-rc4/arch/powerpc/kernel/setup_64.c:23:
>
> start looking for the problem here. Why does you arch code include ide.h?
Because it is needed in a few places.
Better hide everything in ide.h inside #ifdef CONFIG_IDE
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: request_queue_t depends on CONFIG_BLOCK
2007-03-23 0:10 ` Olaf Hering
@ 2007-03-23 18:29 ` Bartlomiej Zolnierkiewicz
2007-03-23 19:14 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-03-23 18:29 UTC (permalink / raw)
To: Olaf Hering; +Cc: Christoph Hellwig, linux-kernel, linux-ide
Hi,
On Friday 23 March 2007, Olaf Hering wrote:
> On Thu, Mar 22, Christoph Hellwig wrote:
>
> > On Thu, Mar 22, 2007 at 10:52:34PM +0100, Olaf Hering wrote:
> > > How can this compile error be fixed properly?
> > > request_queue_t is inside CONFIG_BLOCK,
> > > ide_drive_s (and likely others) use it unconditionally.
> > >
> > >
> > > CC arch/powerpc/kernel/setup_64.o
> > > In file included from linux-2.6.21-rc4/arch/powerpc/kernel/setup_64.c:23:
> >
> > start looking for the problem here. Why does you arch code include ide.h?
>
> Because it is needed in a few places.
Is there really any PPC64 specific code which needs <linux/ide.h>
(ppc_ide_md is used only by PPC32)?
> Better hide everything in ide.h inside #ifdef CONFIG_IDE
<linux/ide.h> is _stricly_ for IDE subsystem, please fix PPC64 code instead
Thanks,
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: request_queue_t depends on CONFIG_BLOCK
2007-03-23 18:29 ` Bartlomiej Zolnierkiewicz
@ 2007-03-23 19:14 ` Olaf Hering
2007-03-23 20:29 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2007-03-23 19:14 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Christoph Hellwig, linux-kernel, linux-ide
On Fri, Mar 23, Bartlomiej Zolnierkiewicz wrote:
> > Because it is needed in a few places.
>
> Is there really any PPC64 specific code which needs <linux/ide.h>
> (ppc_ide_md is used only by PPC32)?
This is about CONFIG_BLOCK=n, not about arch/... Is all non-driver
code which has to poke into ide code supposed to put an #ifdef
CONFIG_IDE around #include <linux/ide.h>?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: request_queue_t depends on CONFIG_BLOCK
2007-03-23 19:14 ` Olaf Hering
@ 2007-03-23 20:29 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-03-23 20:29 UTC (permalink / raw)
To: Olaf Hering; +Cc: Christoph Hellwig, linux-kernel, linux-ide
On Friday 23 March 2007, Olaf Hering wrote:
> On Fri, Mar 23, Bartlomiej Zolnierkiewicz wrote:
>
> > > Because it is needed in a few places.
> >
> > Is there really any PPC64 specific code which needs <linux/ide.h>
> > (ppc_ide_md is used only by PPC32)?
I suspect that the answer to my question is "not really", if so then
shouldn't the problem that you've encountered be fixed with a one-line patch
which removes <linux/ide.h> include from arch/powerpc/kernel/setup_64.c?
Please try it.
> This is about CONFIG_BLOCK=n, not about arch/... Is all non-driver
> code which has to poke into ide code supposed to put an #ifdef
> CONFIG_IDE around #include <linux/ide.h>?
Such code is _broken_ (as you've just found out) by _implicitly_ depending
on CONFIG_IDE specific data structures and functions. Please note that
<linux/ide.h> is CONFIG_IDE specific and CONFIG_IDE depends on CONFIG_BLOCK=y
so <linux/ide.h> should _not_ be included et all for CONFIG_BLOCK=n case...
PS IDE subsystem has allowed per arch/platform host drivers for years and if
somebody needs help in fixing the existing arch/... (ab)users of <linux/ide.h>
I'll be glad to provide it.
Thanks,
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-23 20:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-22 21:52 request_queue_t depends on CONFIG_BLOCK Olaf Hering
2007-03-22 21:53 ` Christoph Hellwig
2007-03-23 0:10 ` Olaf Hering
2007-03-23 18:29 ` Bartlomiej Zolnierkiewicz
2007-03-23 19:14 ` Olaf Hering
2007-03-23 20:29 ` Bartlomiej Zolnierkiewicz
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).