2009-04-21 18:52:14

by Subrata Modak

[permalink] [raw]
Subject: [BUILD FAILURE 05/12] Next April 21 : PPC64 randconfig [drivers/macintosh/mediabay.o]

Reported this earlier on 14th April:
http://lkml.org/lkml/2009/4/14/490,

Is there a solution available ?

CC drivers/macintosh/mediabay.o
In file included from drivers/macintosh/mediabay.c:21:
include/linux/ide.h:610: error: field ‘sense_rq’ has incomplete type
make[2]: *** [drivers/macintosh/mediabay.o] Error 1
make[1]: *** [drivers/macintosh] Error 2
make: *** [drivers] Error 2
---

Regards--
Subrata


Attachments:
randconfig5-next20090421-ppc64 (44.32 kB)

Subject: Re: [BUILD FAILURE 05/12] Next April 21 : PPC64 randconfig [drivers/macintosh/mediabay.o]

On Tuesday 21 April 2009 20:51:15 Subrata Modak wrote:
> Reported this earlier on 14th April:
> http://lkml.org/lkml/2009/4/14/490,
>
> Is there a solution available ?

Perfect timing. I was just going through overdue reports.

> CC drivers/macintosh/mediabay.o
> In file included from drivers/macintosh/mediabay.c:21:
> include/linux/ide.h:610: error: field ‘sense_rq’ has incomplete type
> make[2]: *** [drivers/macintosh/mediabay.o] Error 1
> make[1]: *** [drivers/macintosh] Error 2
> make: *** [drivers] Error 2
> ---

From: Bartlomiej Zolnierkiewicz <[email protected]>
Subject: [PATCH] mediabay: fix build for CONFIG_BLOCK=n

On Tuesday 14 April 2009 20:31:21 Subrata Modak wrote:
> Observed the following build error:
> ---
> CC drivers/macintosh/mediabay.o
> In file included from drivers/macintosh/mediabay.c:21:
> include/linux/ide.h:605: error: field ‘request_sense_rq’ has incomplete
> type
> make[2]: *** [drivers/macintosh/mediabay.o] Error 1
> make[1]: *** [drivers/macintosh] Error 2
> make: *** [drivers] Error 2
> ---

mediabay shouldn't include <linux/ide.h> unconditionally so
remove the superfluous include from mediabay.c (<asm/mediabay.h>
will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y).

Reported-by: Subrata Modak <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
drivers/macintosh/mediabay.c | 1 -
1 file changed, 1 deletion(-)

Index: b/drivers/macintosh/mediabay.c
===================================================================
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -18,7 +18,6 @@
#include <linux/timer.h>
#include <linux/stddef.h>
#include <linux/init.h>
-#include <linux/ide.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <asm/prom.h>

2009-04-22 03:59:49

by Paul Mackerras

[permalink] [raw]
Subject: Re: [BUILD FAILURE 05/12] Next April 21 : PPC64 randconfig [drivers/macintosh/mediabay.o]

Bartlomiej Zolnierkiewicz writes:

> mediabay shouldn't include <linux/ide.h> unconditionally so
> remove the superfluous include from mediabay.c (<asm/mediabay.h>
> will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y).

I don't like relying on second-hand imports like that. I prefer the
previous patch, that made mediabay depend on CONFIG_BLOCK.

BTW, if including <linux/ide.h> causes an error when CONFIG_BLOCK=n,
then there is a bug in <linux/ide.h>, IMO.

Paul.

Subject: Re: [BUILD FAILURE 05/12] Next April 21 : PPC64 randconfig [drivers/macintosh/mediabay.o]

On Wednesday 22 April 2009 05:59:27 Paul Mackerras wrote:
> Bartlomiej Zolnierkiewicz writes:
>
> > mediabay shouldn't include <linux/ide.h> unconditionally so
> > remove the superfluous include from mediabay.c (<asm/mediabay.h>
> > will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y).
>
> I don't like relying on second-hand imports like that. I prefer the
> previous patch, that made mediabay depend on CONFIG_BLOCK.

I missed it somehow...

OK, I found it now and it should fix the problem as well.

> BTW, if including <linux/ide.h> causes an error when CONFIG_BLOCK=n,
> then there is a bug in <linux/ide.h>, IMO.

<linux/ide.h> is for drivers/ide only. mediabay lacks proper abstraction
layer and is probably the only abuser left.

Besides being a build fix my patch is a right step in cleaning this mess
so I'm going to apply it through ide tree.

Thanks,
Bart