[2.6 patch] SCSI nsp32.c: remove inlines

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

  • Next message: Jean Tourrilhes: "Re: [PATCH] Drop ISA dependencies from IRDA drivers"
    Date:	Fri, 16 Jul 2004 00:41:43 +0200
    To: yokota@netlab.is.tsukuba.ac.jp, gotom@debian.or.jp
    
    

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

    <-- snip -->

    ...
      CC drivers/scsi/nsp32.o
    drivers/scsi/nsp32.c: In function `nsp32_prom_start':
    drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call
    to 'nsp32_prom_set': function body not available
    drivers/scsi/nsp32.c:3348: sorry, unimplemented: called from here
    drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call
    to 'nsp32_prom_set': function body not available
    drivers/scsi/nsp32.c:3349: sorry, unimplemented: called from here
    drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call
    to 'nsp32_prom_set': function body not available
    drivers/scsi/nsp32.c:3350: sorry, unimplemented: called from here
    drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call
    to 'nsp32_prom_set': function body not available
    drivers/scsi/nsp32.c:3351: sorry, unimplemented: called from here
    drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call
    to 'nsp32_prom_set': function body not available
    drivers/scsi/nsp32.c:3353: sorry, unimplemented: called from here
    make[2]: *** [drivers/scsi/nsp32.o] Error 1

    <-- snip -->

    The patch below removes the inlines from nsp32_prom_{get,set}.

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

    diffstat output:
     drivers/scsi/nsp32.c | 8 ++++----
     1 files changed, 4 insertions(+), 4 deletions(-)

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- linux-2.6.8-rc1-mm1-full-3.4/drivers/scsi/nsp32.c.old 2004-07-16 00:34:49.000000000 +0200
    +++ linux-2.6.8-rc1-mm1-full-3.4/drivers/scsi/nsp32.c 2004-07-16 00:37:26.000000000 +0200
    @@ -267,8 +267,8 @@
     static int nsp32_prom_read (nsp32_hw_data *, int);
     static int nsp32_prom_read_bit (nsp32_hw_data *);
     static void nsp32_prom_write_bit(nsp32_hw_data *, int);
    -static inline void nsp32_prom_set (nsp32_hw_data *, int, int);
    -static inline int nsp32_prom_get (nsp32_hw_data *, int);
    +static void nsp32_prom_set (nsp32_hw_data *, int, int);
    +static int nsp32_prom_get (nsp32_hw_data *, int);
     
     /* debug/warning/info message */
     static void nsp32_message (const char *, int, char *, char *, ...);
    @@ -3387,7 +3387,7 @@
             return val;
     }
     
    -static inline void nsp32_prom_set(nsp32_hw_data *data, int bit, int val)
    +static void nsp32_prom_set(nsp32_hw_data *data, int bit, int val)
     {
             int base = data->BaseAddress;
             int tmp;
    @@ -3405,7 +3405,7 @@
             udelay(10);
     }
     
    -static inline int nsp32_prom_get(nsp32_hw_data *data, int bit)
    +static int nsp32_prom_get(nsp32_hw_data *data, int bit)
     {
             int base = data->BaseAddress;
             int tmp, ret;

    -
    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: Jean Tourrilhes: "Re: [PATCH] Drop ISA dependencies from IRDA drivers"

    Relevant Pages

    • Re: __alloc_pages ()
      ... > I have found that while allocating the pages in ... > function body is nil. ... I'd say gcc should optimize this out as is already, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • 2.4.28-pre4: e1000_main.c gcc 3.4 compile error
      ... at least the following compile error with gcc 3.4: ... 'e1000_irq_enable': function body not available ... There had been need of rain for many days. ... 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] SCSI tmscsim.c: fix inline compile errors
      ... results in compile errors starting with the following: ... call to 'dc390_EnableMsgOut_Abort': function body not available ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: GCC 3.4 and broken inlining.
      ... > Please tell me that was just a bug, and it will be fixed very soon. ... I'm currently sending fixes for compile errors this causes with gcc 3.4 ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)