FRV: Make BSG declarations dependent on CONFIG_BLOCK
PATCH 1/1 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.
---
include/linux/bsg.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/linux/bsg.h +2 -0
@@ -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
Quoted 24 lines · David Howells
From: David Howells <[email protected]>
Make BSG function declarations dependent on
CONFIG_BLOCKas 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(-)include/linux/bsg.h +1
-0@@ -47,6 +47,7 @@ struct sg_io_v4 { };#ifdef __KERNEL__ +#ifdef CONFIG_BLOCK #if defined(CONFIG_BLK_DEV_BSG ) struct bsg_class_device {
include/linux/bsg.h static inline void bsg_unregister_queue(struct request_queue *rq) · line 73
Quoted 5 lines
include/linux/bsg.h +1
-0@@ -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
Quoted 3 lines · James Bottomley
Are you sure you're testing with git head?
CONFIG_BLK_DEV_BSGcannot be set unlessCONFIG_BLOCKis (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
Quoted 8 lines · David Howells
Quoted 3 lines · James Bottomley
Are you sure you're testing with git head?
CONFIG_BLK_DEV_BSGcannot be set unlessCONFIG_BLOCKis (which was a bug in previous releases now fixed in git head ... unless the fix has gone wrong?).Neither
CONFIG_BLK_DEV_BSGnorCONFIG_BLOCKare set. The problem is that the stub BSG functions refer to undefined structures whenCONFIG_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