Skip to contentSkip to conversation

FRV: Make BSG declarations dependent on CONFIG_BLOCK

PATCH In review David Howells 2 participants 4 messages Aug 1, 2007 BSG (block layer generic sg v4 driver)

lore
Share & tools
lore
#0 lore raw

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
index 102dc09..e917c41 100644
@@ -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
#1 lore raw
Quoted 24 lines · David Howells

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 +1 -0
index 102dc09..e917c41 100644
@@ -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

#2 lore raw
Quoted 3 lines · James Bottomley

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

#3 lore raw
Quoted 8 lines · David Howells
Quoted 3 lines · James Bottomley

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