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

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 07/16/04

  • Next message: Niel Lambrechts: "[2.6.7-mm5 ACPI] Error: Looking up [SERN] in namespace"
    Date:	Fri, 16 Jul 2004 00:47:26 +0200
    To: James.Bottomley@SteelEye.com
    
    

    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@fs.tum.de>

    --- 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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Niel Lambrechts: "[2.6.7-mm5 ACPI] Error: Looking up [SERN] in namespace"

    Relevant Pages

    • [2.6 patch] net/tulip/dmfe.c: fix inline compile errors
      ... gcc 3.4 results in the following compile error: ... call to 'cal_CRC': function body not available ... static void dmfe_dynamic_reset; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: gcc-3.4.1 and -Winline
      ... Here's a patch to reorder timer_tsc.c so gcc 3.4 does not fail to inline ... to 'cpufreq_delayed_get': function body not available" ... static void delay_tsc ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH] fix inlining related build failures in mxser.c
      ... failures (which arefixed by the patch below): ... 'mxser_check_modem_status': function body not available ... static void mxser_shutdown; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.4 patch][1/6] ibmphp_res.c: fix gcc 3.4 compilation
      ... gcc 3.4: ... 'find_bus_wprev': function body not available ... static void fix_resources; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.6 patch] mxser.c: fix inlines
      ... results in the following compile error: ... to 'mxser_check_modem_status': function body not available ... The patch below moves mxser_interrupt below the inline functions it ... static void mxser_start; ...
      (Linux-Kernel)