[2.6 patch] SCSI tmscsim.c: fix inline compile errors

From: Adrian Bunk
Date: Thu Jul 15 2004 - 17:48:48 EST


Trying to compile drivers/scsi/tmscsim.c in 2.6.8-rc1-mm1 using gcc 3.4
results in compile errors starting with the following:

<-- snip -->

...
CC drivers/scsi/tmscsim.o
In file included from drivers/scsi/tmscsim.c:1477:
drivers/scsi/scsiiom.c: In function `do_DC390_Interrupt':
drivers/scsi/tmscsim.c:295: sorry, unimplemented: inlining failed in
call to 'dc390_InvalidCmd': function body not available
drivers/scsi/scsiiom.c:279: sorry, unimplemented: called from here
drivers/scsi/tmscsim.c:296: sorry, unimplemented: inlining failed in
call to 'dc390_EnableMsgOut_Abort': function body not available
drivers/scsi/scsiiom.c:317: sorry, unimplemented: called from here
make[2]: *** [drivers/scsi/tmscsim.o] Error 1

<-- snip -->


The patch below removes the inlines from the affected functions.

An alternative approach would be to move the functions above the place
where they are called the first time.



diffstat output:
drivers/scsi/scsiiom.c | 6 +++---
drivers/scsi/tmscsim.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)


Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.7-mm6-full-gcc3.4/drivers/scsi/scsiiom.c.old 2004-07-09 01:31:13.000000000 +0200
+++ linux-2.6.7-mm6-full-gcc3.4/drivers/scsi/scsiiom.c 2004-07-09 01:33:35.000000000 +0200
@@ -594,7 +594,7 @@
}

/* abort command */
-static void __inline__
+static void
dc390_EnableMsgOut_Abort ( struct dc390_acb* pACB, struct dc390_srb* pSRB )
{
pSRB->MsgOutBuf[0] = ABORT;
@@ -1656,7 +1656,7 @@
}


-static void __inline__
+static void
dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB )
{
struct scsi_cmnd *pcmd;
@@ -1696,7 +1696,7 @@



-static void __inline__
+static void
dc390_InvalidCmd( struct dc390_acb* pACB )
{
if( pACB->pActiveDCB->pActiveSRB->SRBState & (SRB_START_+SRB_MSGOUT) )
--- linux-2.6.7-mm6-full-gcc3.4/drivers/scsi/tmscsim.c.old 2004-07-09 01:29:36.000000000 +0200
+++ linux-2.6.7-mm6-full-gcc3.4/drivers/scsi/tmscsim.c 2004-07-09 01:33:46.000000000 +0200
@@ -291,9 +291,9 @@
static void dc390_DoingSRB_Done( struct dc390_acb* pACB, struct scsi_cmnd * cmd);
static void dc390_ScsiRstDetect( struct dc390_acb* pACB );
static void dc390_ResetSCSIBus( struct dc390_acb* pACB );
-static void __inline__ dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB );
-static void __inline__ dc390_InvalidCmd( struct dc390_acb* pACB );
-static void __inline__ dc390_EnableMsgOut_Abort (struct dc390_acb*, struct dc390_srb*);
+static void dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB );
+static void dc390_InvalidCmd( struct dc390_acb* pACB );
+static void dc390_EnableMsgOut_Abort (struct dc390_acb*, struct dc390_srb*);
static irqreturn_t do_DC390_Interrupt( int, void *, struct pt_regs *);

static int dc390_initAdapter(struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index );

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/