Re: [build fix] Re: [GIT PATCH] SCSI part 1

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, linux-scsi <linux-scsi@...>, linux-kernel <linux-kernel@...>
Date: Wednesday, July 16, 2008 - 9:52 am

On Wed, 2008-07-16 at 15:15 +0200, Ingo Molnar wrote:

Erm, Ingo, if you'd just follow linux-next instead of your own tree,
you'd see there's already a fix for this.

James

----

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n
to avoid build errors:

In file included from linux-next-20080708/include/scsi/scsi.h:12,
                 from linux-next-20080708/fs/compat_ioctl.c:71:
linux-next-20080708/include/scsi/scsi_cmnd.h:27:25: warning:
"BLK_MAX_CDB" is not defined
linux-next-20080708/include/scsi/scsi_cmnd.h:28:3: error: #error
MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
In file included from linux-next-20080708/include/scsi/scsi.h:12,
                 from linux-next-20080708/fs/compat_ioctl.c:71:
linux-next-20080708/include/scsi/scsi_cmnd.h: In function
'scsi_bidi_cmnd':
linux-next-20080708/include/scsi/scsi_cmnd.h:182: error: implicit
declaration of function 'blk_bidi_rq'
linux-next-20080708/include/scsi/scsi_cmnd.h:183: error: dereferencing
pointer to incomplete type
linux-next-20080708/include/scsi/scsi_cmnd.h: In function 'scsi_in':
linux-next-20080708/include/scsi/scsi_cmnd.h:189: error: dereferencing
pointer to incomplete type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 fs/compat_ioctl.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux-next-20080708.orig/fs/compat_ioctl.c
+++ linux-next-20080708/fs/compat_ioctl.c
@@ -68,9 +68,11 @@
 #include <linux/capi.h>
 #include <linux/gigaset_dev.h>
 
+#ifdef CONFIG_BLOCK
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/sg.h>
+#endif
 
 #include <asm/uaccess.h>
 #include <linux/ethtool.h>
@@ -1965,6 +1967,7 @@ COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
 COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
 COMPATIBLE_IOCTL(PIO_FONTRESET)
 COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
+#ifdef CONFIG_BLOCK
 /* Big S */
 COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
 COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
@@ -1974,6 +1977,7 @@ COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMB
 COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
 COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
 COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
+#endif
 /* Big T */
 COMPATIBLE_IOCTL(TUNSETNOCSUM)
 COMPATIBLE_IOCTL(TUNSETDEBUG)
@@ -2044,6 +2048,7 @@ COMPATIBLE_IOCTL(SIOCGIFVLAN)
 COMPATIBLE_IOCTL(SIOCSIFVLAN)
 COMPATIBLE_IOCTL(SIOCBRADDBR)
 COMPATIBLE_IOCTL(SIOCBRDELBR)
+#ifdef CONFIG_BLOCK
 /* SG stuff */
 COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
@@ -2068,6 +2073,7 @@ COMPATIBLE_IOCTL(SG_SCSI_RESET)
 COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
 COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
 COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
+#endif
 /* PPP stuff */
 COMPATIBLE_IOCTL(PPPIOCGFLAGS)
 COMPATIBLE_IOCTL(PPPIOCSFLAGS)


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] SCSI part 1, James Bottomley, (Tue Jul 15, 12:15 pm)
[build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 6:16 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 6:33 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 9:15 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, James Bottomley, (Wed Jul 16, 9:52 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 10:54 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 10:18 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Matthew Wilcox, (Wed Jul 16, 10:41 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 10:46 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Matthew Wilcox, (Wed Jul 16, 10:57 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 10:59 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, James Bottomley, (Wed Jul 16, 10:28 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Ingo Molnar, (Wed Jul 16, 10:45 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, James Bottomley, (Wed Jul 16, 11:11 am)
Re: [build fix] Re: [GIT PATCH] SCSI part 1, Matthew Wilcox, (Wed Jul 16, 9:28 am)