public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sym53c8xx_2: fix compilation on alpha
@ 2006-01-16  0:00 Alexey Dobriyan
  2006-01-16  0:27 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-01-16  0:00 UTC (permalink / raw)
  To: linux-scsi; +Cc: Al Viro

  CC [M]  drivers/scsi/sym53c8xx_2/sym_fw.o
In file included from drivers/scsi/sym53c8xx_2/sym_glue.h:59,
                 from drivers/scsi/sym53c8xx_2/sym_fw.c:40:
include/scsi/scsi_transport_spi.h:57: error: field `dv_mutex' has incomplete type

et al.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/scsi/sym53c8xx_2/sym_fw.c     |    1 +
 drivers/scsi/sym53c8xx_2/sym_hipd.c   |    1 +
 drivers/scsi/sym53c8xx_2/sym_malloc.c |    1 +
 drivers/scsi/sym53c8xx_2/sym_nvram.c  |    1 +
 4 files changed, 4 insertions(+)

--- a/drivers/scsi/sym53c8xx_2/sym_fw.c
+++ b/drivers/scsi/sym53c8xx_2/sym_fw.c
@@ -37,6 +37,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/mutex.h>
 #include "sym_glue.h"
 
 /*
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -39,6 +39,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/mutex.h>
 #include <asm/param.h>		/* for timeouts in units of HZ */
 #include <scsi/scsi_dbg.h>
 
--- a/drivers/scsi/sym53c8xx_2/sym_malloc.c
+++ b/drivers/scsi/sym53c8xx_2/sym_malloc.c
@@ -37,6 +37,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/mutex.h>
 #include "sym_glue.h"
 
 /*
--- a/drivers/scsi/sym53c8xx_2/sym_nvram.c
+++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c
@@ -37,6 +37,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/mutex.h>
 #include "sym_glue.h"
 #include "sym_nvram.h"
 


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

* Re: [PATCH] sym53c8xx_2: fix compilation on alpha
  2006-01-16  0:00 [PATCH] sym53c8xx_2: fix compilation on alpha Alexey Dobriyan
@ 2006-01-16  0:27 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2006-01-16  0:27 UTC (permalink / raw)
  To: Jes Sorensen, Alexey Dobriyan; +Cc: linux-scsi, Al Viro

On Mon, 2006-01-16 at 03:00 +0300, Alexey Dobriyan wrote:
>   CC [M]  drivers/scsi/sym53c8xx_2/sym_fw.o
> In file included from drivers/scsi/sym53c8xx_2/sym_glue.h:59,
>                  from drivers/scsi/sym53c8xx_2/sym_fw.c:40:
> include/scsi/scsi_transport_spi.h:57: error: field `dv_mutex' has incomplete type
> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
> @@ -39,6 +39,7 @@
>   */
>  
>  #include <linux/slab.h>
> +#include <linux/mutex.h>

Actually, this isn't the right fix.  The problem lies in the conversion
of the transport class from semaphore to mutex, so the include belongs
in scsi_transport_spi.h

In theory, it could be a simple 'struct mutex' declaration, since no
driver ever uses it, but I'm afraid gcc might not be happy dereferencing
members of a structure containing a type of unknown size (even if it is
at the end).

James

diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -21,6 +21,7 @@
 #define SCSI_TRANSPORT_SPI_H
 
 #include <linux/config.h>
+#include <linux/mutex.h>
 #include <linux/transport_class.h>
 
 struct scsi_transport_template;



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

end of thread, other threads:[~2006-01-16  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16  0:00 [PATCH] sym53c8xx_2: fix compilation on alpha Alexey Dobriyan
2006-01-16  0:27 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox