[2.4 patch][1/6] lmc_media.c: fix gcc 3.4 compilation

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/26/04

  • Next message: Jan-Benedict Glaw: "Re: kernel argument list too long"
    Date:	Thu, 26 Aug 2004 21:56:43 +0200
    To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
    
    

    I got the following compile error when trying to build 2.4.28-pre2 using
    gcc 3.4:

    <-- snip -->

    ...
    gcc-3.4 -D__KERNEL__
    -I/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/include -Wall
    -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
    -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon
    -fno-unit-at-a-time -I. -nostdinc -iwithprefix include
    -DKBUILD_BASENAME=lmc_media -c -o lmc_media.o lmc_media.c
    lmc_media.c: In function `lmc_t1_get_link_status':
    lmc_debug.h:50: sorry, unimplemented: inlining failed in call to
    'lmc_trace': function body not available
    lmc_media.c:1073: sorry, unimplemented: called from here
    lmc_debug.h:50: sorry, unimplemented: inlining failed in call to
    'lmc_trace': function body not available
    lmc_media.c:1168: sorry, unimplemented: called from here
    make[5]: *** [lmc_media.o] Error 1
    make[5]: Leaving directory `/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/drivers/net/wan/lmc'

    <-- snip -->

    The patch below fixes this issue by uninlining lmc_trace.

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

    --- linux-2.4.28-pre2-full/drivers/net/wan/lmc/lmc_debug.h.old 2004-08-26 18:58:03.000000000 +0200
    +++ linux-2.4.28-pre2-full/drivers/net/wan/lmc/lmc_debug.h 2004-08-26 18:58:32.000000000 +0200
    @@ -47,6 +47,6 @@
     
     void lmcConsoleLog(char *type, unsigned char *ucData, int iLen);
     void lmcEventLog (u_int32_t EventNum, u_int32_t arg2, u_int32_t arg3);
    -inline void lmc_trace(struct net_device *dev, char *msg);
    +void lmc_trace(struct net_device *dev, char *msg);
     
     #endif
    --- linux-2.4.28-pre2-full/drivers/net/wan/lmc/lmc_debug.c.old 2004-08-26 18:59:32.000000000 +0200
    +++ linux-2.4.28-pre2-full/drivers/net/wan/lmc/lmc_debug.c 2004-08-26 18:59:47.000000000 +0200
    @@ -66,7 +66,7 @@
     #endif
     }
     
    -inline void lmc_trace(struct net_device *dev, char *msg){
    +void lmc_trace(struct net_device *dev, char *msg){
     #ifdef LMC_TRACE
         unsigned long j = jiffies + 3; /* Wait for 50 ms */
     

    -
    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: Jan-Benedict Glaw: "Re: kernel argument list too long"

    Relevant Pages

    • Re: small string question
      ... function body where I'm making the error. ... char passw ... I realized that by "return passw;" you were attempting to retry the password verification. ... It requires extra resources for recursion and also subjects the code to crashing if repeated failures are made. ...
      (comp.lang.c)
    • Re: small string question
      ... function body where I'm making the error. ... char passw ... there are many such conventions, but going too much into specifics tends to ... to adhere to the common conventions unless there is some good reason to do ...
      (comp.lang.c)
    • Re: small string question
      ... function body where I'm making the error. ... char passw ... to so blatently violate them, ... are many common, specific, and generally informally enforced conventions. ...
      (comp.lang.c)
    • Re: small string question
      ... function body where I'm making the error. ... Not assigning nameto anything ... char passw ... else if!0) {puts("unequal rtry again"); ...
      (comp.lang.c)
    • Re: getting usb mass storage to finish before running init?
      ... void check_okay(int res, const char *errmsg) ... int correct_medium ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)