linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BSG: BLK_DEV_BSG=y , BLOCK=n compile error
@ 2007-07-28 12:54 Gabriel C
  2007-07-28 14:45 ` FUJITA Tomonori
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel C @ 2007-07-28 12:54 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: FUJITA Tomonori, linux-scsi

Hi,

BSG does not compile without BLOCK set :

...

block/bsg.c: In function 'blk_fill_sgv4_hdr_rq':
block/bsg.c:186: error: 'BLK_MAX_CDB' undeclared (first use in this function)
block/bsg.c:186: error: (Each undeclared identifier is reported only once
block/bsg.c:186: error: for each function it appears in.)
block/bsg.c:186: error: dereferencing pointer to incomplete type
block/bsg.c:186: error: dereferencing pointer to incomplete type
block/bsg.c:186: error: dereferencing pointer to incomplete type
block/bsg.c:186: error: dereferencing pointer to incomplete type
block/bsg.c:188: error: dereferencing pointer to incomplete type
block/bsg.c:193: error: implicit declaration of function 'blk_verify_command'
block/bsg.c:193: error: dereferencing pointer to incomplete type
block/bsg.c:201: error: dereferencing pointer to incomplete type
block/bsg.c:202: error: dereferencing pointer to incomplete type
block/bsg.c:202: error: 'REQ_TYPE_BLOCK_PC' undeclared (first use in this function)
block/bsg.c:204: error: dereferencing pointer to incomplete type
block/bsg.c:205: error: dereferencing pointer to incomplete type
block/bsg.c:206: error: dereferencing pointer to incomplete type
block/bsg.c:206: error: dereferencing pointer to incomplete type
block/bsg.c:207: error: dereferencing pointer to incomplete type
block/bsg.c:208: error: dereferencing pointer to incomplete type
block/bsg.c:208: error: 'BLK_DEFAULT_SG_TIMEOUT' undeclared (first use in this function)
block/bsg.c: In function 'bsg_validate_sgv4_hdr':
block/bsg.c:223: error: 'BLK_MAX_CDB' undeclared (first use in this function)
block/bsg.c:225: error: dereferencing pointer to incomplete type
block/bsg.c:226: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_map_hdr':
block/bsg.c:270: error: implicit declaration of function 'blk_get_request'
block/bsg.c:270: warning: assignment makes pointer from integer without a cast
block/bsg.c:279: error: 'QUEUE_FLAG_BIDI' undeclared (first use in this function)
block/bsg.c:279: error: dereferencing pointer to incomplete type
block/bsg.c:279: error: dereferencing pointer to incomplete type
block/bsg.c:284: warning: assignment makes pointer from integer without a cast
block/bsg.c:289: error: dereferencing pointer to incomplete type
block/bsg.c:292: error: implicit declaration of function 'blk_rq_map_user'
block/bsg.c:313: error: implicit declaration of function 'blk_put_request'
block/bsg.c:315: error: implicit declaration of function 'blk_rq_unmap_user'
block/bsg.c:315: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_rq_end_io':
block/bsg.c:327: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_add_command':
block/bsg.c:351: error: dereferencing pointer to incomplete type
block/bsg.c:352: error: dereferencing pointer to incomplete type
block/bsg.c:358: error: dereferencing pointer to incomplete type
block/bsg.c:359: error: dereferencing pointer to incomplete type
block/bsg.c:360: error: dereferencing pointer to incomplete type
block/bsg.c:368: error: dereferencing pointer to incomplete type
block/bsg.c:369: error: implicit declaration of function 'blk_execute_rq_nowait'
block/bsg.c: In function 'blk_complete_sgv4_hdr_rq':
block/bsg.c:426: error: dereferencing pointer to incomplete type
block/bsg.c:427: error: dereferencing pointer to incomplete type
block/bsg.c:428: error: dereferencing pointer to incomplete type
block/bsg.c:432: error: dereferencing pointer to incomplete type
block/bsg.c:435: error: dereferencing pointer to incomplete type
block/bsg.c:436: error: dereferencing pointer to incomplete type
block/bsg.c:440: error: dereferencing pointer to incomplete type
block/bsg.c:447: error: dereferencing pointer to incomplete type
block/bsg.c:449: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_put_device':
block/bsg.c:723: error: implicit declaration of function 'blk_put_queue'
block/bsg.c: In function 'bsg_add_device':
block/bsg.c:745: error: dereferencing pointer to incomplete type
block/bsg.c:753: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_ioctl':
block/bsg.c:884: error: implicit declaration of function 'scsi_cmd_ioctl'
block/bsg.c:898: error: dereferencing pointer to incomplete type
block/bsg.c:899: error: dereferencing pointer to incomplete type
block/bsg.c:900: error: dereferencing pointer to incomplete type
block/bsg.c:901: error: implicit declaration of function 'blk_execute_rq'
block/bsg.c: In function 'bsg_unregister_queue':
block/bsg.c:933: error: dereferencing pointer to incomplete type
block/bsg.c:939: error: dereferencing pointer to incomplete type
block/bsg.c: In function 'bsg_register_queue':
block/bsg.c:967: error: dereferencing pointer to incomplete type
block/bsg.c:970: error: dereferencing pointer to incomplete type
block/bsg.c:1005: error: dereferencing pointer to incomplete type
block/bsg.c:1006: error: dereferencing pointer to incomplete type
make[1]: *** [block/bsg.o] Error 1
make: *** [block] Error 2
make: *** Waiting for unfinished jobs....

...

A solution would be to move 'endif # BLOCK' in block/Kconfig after config BLK_DEV_BSG and 
before source block/Kconfig.iosched but that would move BSG inside the BLOCK menu.

Regards,

Gabriel C

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

* Re: BSG: BLK_DEV_BSG=y , BLOCK=n compile error
  2007-07-28 12:54 BSG: BLK_DEV_BSG=y , BLOCK=n compile error Gabriel C
@ 2007-07-28 14:45 ` FUJITA Tomonori
  2007-07-28 15:16   ` Gabriel C
  0 siblings, 1 reply; 3+ messages in thread
From: FUJITA Tomonori @ 2007-07-28 14:45 UTC (permalink / raw)
  To: James.Bottomley, nix.or.die
  Cc: linux-kernel, fujita.tomonori, linux-scsi, tomof

From: Gabriel C <nix.or.die@googlemail.com>
Subject: BSG: BLK_DEV_BSG=y , BLOCK=n compile error
Date: Sat, 28 Jul 2007 14:54:02 +0200

> Hi,
> 
> BSG does not compile without BLOCK set :

Thanks, this has already been addressed.

http://marc.info/?l=linux-kernel&m=118534836402440&w=2


James, could you add the patch to scsi-rc-fixes? Thanks.

---
From: Paul Mundt <lethal@linux-sh.org>
Subject: [PATCH] bsg: Fix build for CONFIG_BLOCK=n

BLK_DEV_BSG was added outside of the if BLOCK check, which allows it to
be enabled when CONFIG_BLOCK=n. This leads to many screenlengths of
errors, starting with a parse error on the request_queue_t definition.
Obviously this wasn't intended for CONFIG_BLOCK=n usage, so just move the
option back in to the block.

Caught with a randconfig on sh.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 block/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index ca2ef4e..2484e0e 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -49,8 +49,6 @@ config LSF
 
 	  If unsure, say Y.
 
-endif # BLOCK
-
 config BLK_DEV_BSG
 	bool "Block layer SG support v4 (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
@@ -64,4 +62,6 @@ config BLK_DEV_BSG
 	protocols (e.g. Task Management Functions and SMP in Serial
 	Attached SCSI).
 
+endif # BLOCK
+
 source block/Kconfig.iosched
-- 
1.5.2.4


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

* Re: BSG: BLK_DEV_BSG=y , BLOCK=n compile error
  2007-07-28 14:45 ` FUJITA Tomonori
@ 2007-07-28 15:16   ` Gabriel C
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel C @ 2007-07-28 15:16 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: James.Bottomley, linux-kernel, fujita.tomonori, linux-scsi

FUJITA Tomonori wrote:
> From: Gabriel C <nix.or.die@googlemail.com>
> Subject: BSG: BLK_DEV_BSG=y , BLOCK=n compile error
> Date: Sat, 28 Jul 2007 14:54:02 +0200
> 
>> Hi,
>>
>> BSG does not compile without BLOCK set :
> 
> Thanks, this has already been addressed.
> 
> http://marc.info/?l=linux-kernel&m=118534836402440&w=2
> 

Upss , sorry I didn't find that one is why I reported it.


Gabriel

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

end of thread, other threads:[~2007-07-28 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-28 12:54 BSG: BLK_DEV_BSG=y , BLOCK=n compile error Gabriel C
2007-07-28 14:45 ` FUJITA Tomonori
2007-07-28 15:16   ` Gabriel C

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).