linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* compile error if CONFIG_BLOCK not enabled related to linux/ide.h include
@ 2007-07-18  5:02 Kumar Gala
  2007-07-18 10:47 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2007-07-18  5:02 UTC (permalink / raw)
  To: bzolnier; +Cc: linux-kernel, linuxppc-dev, linux-ide

M:      bzolnier@gmail.com
L:      linux-ide@vger.kernel.org

We get the following compile error if CONFIG_BLOCK isn't enabled:

  CC      arch/powerpc/kernel/setup_32.o
In file included from arch/powerpc/kernel/setup_32.c:14:
include/linux/ide.h:558: error: expected specifier-qualifier-list before 'request_queue_t'
include/linux/ide.h:696: warning: 'struct request' declared inside parameter list
include/linux/ide.h:696: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/ide.h:820: warning: 'struct request' declared inside parameter list
include/linux/ide.h:853: error: field 'wrq' has incomplete type
include/linux/ide.h:1205: error: expected ')' before '*' token
make[1]: *** [arch/powerpc/kernel/setup_32.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

What I'm trying to figure out is if include/linux/ide.h should be wrapped
in a #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) or if there is
some other desired way to handle this.

This seems to stem from the fact that include/linux/blkdev.h is wrapped in
a CONFIG_BLOCK and thus request_queue_t isn't always defined.

- k



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile error if CONFIG_BLOCK not enabled related to linux/ide.h include
  2007-07-18  5:02 compile error if CONFIG_BLOCK not enabled related to linux/ide.h include Kumar Gala
@ 2007-07-18 10:47 ` Bartlomiej Zolnierkiewicz
  2007-07-18 14:12   ` Kumar Gala
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-18 10:47 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linux-kernel, linuxppc-dev, linux-ide


Hi,

On Wednesday 18 July 2007, Kumar Gala wrote:
> M:      bzolnier@gmail.com
> L:      linux-ide@vger.kernel.org
> 
> We get the following compile error if CONFIG_BLOCK isn't enabled:
> 
>   CC      arch/powerpc/kernel/setup_32.o
> In file included from arch/powerpc/kernel/setup_32.c:14:
> include/linux/ide.h:558: error: expected specifier-qualifier-list before 'request_queue_t'
> include/linux/ide.h:696: warning: 'struct request' declared inside parameter list
> include/linux/ide.h:696: warning: its scope is only this definition or declaration, which is probably not what you want
> include/linux/ide.h:820: warning: 'struct request' declared inside parameter list
> include/linux/ide.h:853: error: field 'wrq' has incomplete type
> include/linux/ide.h:1205: error: expected ')' before '*' token
> make[1]: *** [arch/powerpc/kernel/setup_32.o] Error 1
> make: *** [arch/powerpc/kernel] Error 2

include/linux/ide.h is exclusively for IDE subsystem

> What I'm trying to figure out is if include/linux/ide.h should be wrapped
> in a #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) or if there is
> some other desired way to handle this.

Plese remove <linux/ide.h> include, there doesn't seem to be any piece of
code in arch/powerpc/kernel/setup_32.c which needs it anyway.

Thanks,
Bart

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile error if CONFIG_BLOCK not enabled related to linux/ide.h include
  2007-07-18 10:47 ` Bartlomiej Zolnierkiewicz
@ 2007-07-18 14:12   ` Kumar Gala
  2007-07-18 20:44     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2007-07-18 14:12 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linuxppc-dev, linux-ide


On Jul 18, 2007, at 5:47 AM, Bartlomiej Zolnierkiewicz wrote:

>
> Hi,
>
> On Wednesday 18 July 2007, Kumar Gala wrote:
>> M:      bzolnier@gmail.com
>> L:      linux-ide@vger.kernel.org
>>
>> We get the following compile error if CONFIG_BLOCK isn't enabled:
>>
>>   CC      arch/powerpc/kernel/setup_32.o
>> In file included from arch/powerpc/kernel/setup_32.c:14:
>> include/linux/ide.h:558: error: expected specifier-qualifier-list  
>> before 'request_queue_t'
>> include/linux/ide.h:696: warning: 'struct request' declared inside  
>> parameter list
>> include/linux/ide.h:696: warning: its scope is only this  
>> definition or declaration, which is probably not what you want
>> include/linux/ide.h:820: warning: 'struct request' declared inside  
>> parameter list
>> include/linux/ide.h:853: error: field 'wrq' has incomplete type
>> include/linux/ide.h:1205: error: expected ')' before '*' token
>> make[1]: *** [arch/powerpc/kernel/setup_32.o] Error 1
>> make: *** [arch/powerpc/kernel] Error 2
>
> include/linux/ide.h is exclusively for IDE subsystem
>
>> What I'm trying to figure out is if include/linux/ide.h should be  
>> wrapped
>> in a #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) or if  
>> there is
>> some other desired way to handle this.
>
> Plese remove <linux/ide.h> include, there doesn't seem to be any  
> piece of
> code in arch/powerpc/kernel/setup_32.c which needs it anyway.

Its needed for:

struct ide_machdep_calls ppc_ide_md;

which gets defined in asm/ide.h which needs linux/ide.h for the defn  
of ide_init_hwif.

- k




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile error if CONFIG_BLOCK not enabled related to linux/ide.h include
  2007-07-18 14:12   ` Kumar Gala
@ 2007-07-18 20:44     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-18 20:44 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linux-kernel, linuxppc-dev, linux-ide

On Wednesday 18 July 2007, Kumar Gala wrote:
> 
> On Jul 18, 2007, at 5:47 AM, Bartlomiej Zolnierkiewicz wrote:
> 
> >
> > Hi,
> >
> > On Wednesday 18 July 2007, Kumar Gala wrote:
> >> M:      bzolnier@gmail.com
> >> L:      linux-ide@vger.kernel.org
> >>
> >> We get the following compile error if CONFIG_BLOCK isn't enabled:
> >>
> >>   CC      arch/powerpc/kernel/setup_32.o
> >> In file included from arch/powerpc/kernel/setup_32.c:14:
> >> include/linux/ide.h:558: error: expected specifier-qualifier-list  
> >> before 'request_queue_t'
> >> include/linux/ide.h:696: warning: 'struct request' declared inside  
> >> parameter list
> >> include/linux/ide.h:696: warning: its scope is only this  
> >> definition or declaration, which is probably not what you want
> >> include/linux/ide.h:820: warning: 'struct request' declared inside  
> >> parameter list
> >> include/linux/ide.h:853: error: field 'wrq' has incomplete type
> >> include/linux/ide.h:1205: error: expected ')' before '*' token
> >> make[1]: *** [arch/powerpc/kernel/setup_32.o] Error 1
> >> make: *** [arch/powerpc/kernel] Error 2
> >
> > include/linux/ide.h is exclusively for IDE subsystem
> >
> >> What I'm trying to figure out is if include/linux/ide.h should be  
> >> wrapped
> >> in a #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) or if  
> >> there is
> >> some other desired way to handle this.
> >
> > Plese remove <linux/ide.h> include, there doesn't seem to be any  
> > piece of
> > code in arch/powerpc/kernel/setup_32.c which needs it anyway.
> 
> Its needed for:
> 
> struct ide_machdep_calls ppc_ide_md;
> 
> which gets defined in asm/ide.h which needs linux/ide.h for the defn  
> of ide_init_hwif.

Ah, this is a PPC special case.

In this case I think the best solution for now is to just add #ifdefs
(the proper/clean solution would be adding IDE host drivers for PPC
platforms needing special handling).

Thanks,
Bart

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-18 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-18  5:02 compile error if CONFIG_BLOCK not enabled related to linux/ide.h include Kumar Gala
2007-07-18 10:47 ` Bartlomiej Zolnierkiewicz
2007-07-18 14:12   ` Kumar Gala
2007-07-18 20:44     ` 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).