2007-08-01 09:14:15

by David Howells

[permalink] [raw]
Subject: [PATCH] FRV: Make BSG declarations dependent on CONFIG_BLOCK

From: David Howells <[email protected]>

Make BSG function declarations dependent on CONFIG_BLOCK as they are not
compilable if the block layer is compiled out.

Signed-off-by: David Howells <[email protected]>
---

include/linux/bsg.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/bsg.h b/include/linux/bsg.h
index 102dc09..e917c41 100644
--- a/include/linux/bsg.h
+++ b/include/linux/bsg.h
@@ -47,6 +47,7 @@ struct sg_io_v4 {
};

#ifdef __KERNEL__
+#ifdef CONFIG_BLOCK

#if defined(CONFIG_BLK_DEV_BSG)
struct bsg_class_device {
@@ -68,6 +69,7 @@ static inline void bsg_unregister_queue(struct request_queue *rq)
}
#endif

+#endif /* CONFIG_BLOCK */
#endif /* __KERNEL__ */

#endif


2007-08-01 13:57:20

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] FRV: Make BSG declarations dependent on CONFIG_BLOCK

On Wed, 2007-08-01 at 10:13 +0100, David Howells wrote:
> From: David Howells <[email protected]>
>
> Make BSG function declarations dependent on CONFIG_BLOCK as they are not
> compilable if the block layer is compiled out.
>
> Signed-off-by: David Howells <[email protected]>
> ---
>
> include/linux/bsg.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/bsg.h b/include/linux/bsg.h
> index 102dc09..e917c41 100644
> --- a/include/linux/bsg.h
> +++ b/include/linux/bsg.h
> @@ -47,6 +47,7 @@ struct sg_io_v4 {
> };
>
> #ifdef __KERNEL__
> +#ifdef CONFIG_BLOCK
>
> #if defined(CONFIG_BLK_DEV_BSG)
> struct bsg_class_device {
> @@ -68,6 +69,7 @@ static inline void bsg_unregister_queue(struct request_queue *rq)
> }
> #endif
>
> +#endif /* CONFIG_BLOCK */
> #endif /* __KERNEL__ */

Are you sure you're testing with git head? CONFIG_BLK_DEV_BSG cannot be
set unless CONFIG_BLOCK is (which was a bug in previous releases now
fixed in git head ... unless the fix has gone wrong?).

James


2007-08-01 14:50:47

by David Howells

[permalink] [raw]
Subject: Re: [PATCH] FRV: Make BSG declarations dependent on CONFIG_BLOCK

James Bottomley <[email protected]> wrote:

> Are you sure you're testing with git head? CONFIG_BLK_DEV_BSG cannot be
> set unless CONFIG_BLOCK is (which was a bug in previous releases now
> fixed in git head ... unless the fix has gone wrong?).

Neither CONFIG_BLK_DEV_BSG nor CONFIG_BLOCK are set. The problem is that the
stub BSG functions refer to undefined structures when CONFIG_BLOCK=n.

David

2007-08-01 17:30:31

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] FRV: Make BSG declarations dependent on CONFIG_BLOCK

On Wed, 2007-08-01 at 15:44 +0100, David Howells wrote:
> James Bottomley <[email protected]> wrote:
>
> > Are you sure you're testing with git head? CONFIG_BLK_DEV_BSG cannot be
> > set unless CONFIG_BLOCK is (which was a bug in previous releases now
> > fixed in git head ... unless the fix has gone wrong?).
>
> Neither CONFIG_BLK_DEV_BSG nor CONFIG_BLOCK are set. The problem is that the
> stub BSG functions refer to undefined structures when CONFIG_BLOCK=n.

Hmm, then isn't the fix to add a struct request_queue; and other
definitions above the stub functions?

What is the file that's causing this actual problem ... as in what still
needs to pull in the block headers if CONFIG_BLOCK=n (or more properly,
could it also need to use the bsg stub functions?)

James