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

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

  • Next message: Clive Levinson: "Physical memory mapping with nopage handler"
    Date:	Thu, 26 Aug 2004 21:54:55 +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 -D_LINUX
    -I/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/drivers/acpi
    -nostdinc -iwithprefix include -DKBUILD_BASENAME=ibmphp_res -c -o
    ibmphp_res.o ibmphp_res.c
    ibmphp_res.c: In function `ibmphp_rsrc_init':
    ibmphp_res.c:45: sorry, unimplemented: inlining failed in call to
    'find_bus_wprev': function body not available
    ibmphp_res.c:237: sorry, unimplemented: called from here
    ibmphp_res.c:45: sorry, unimplemented: inlining failed in call to
    'find_bus_wprev': function body not available
    ibmphp_res.c:261: sorry, unimplemented: called from here
    ibmphp_res.c:45: sorry, unimplemented: inlining failed in call to
    'find_bus_wprev': function body not available
    ibmphp_res.c:284: sorry, unimplemented: called from here
    make[3]: *** [ibmphp_res.o] Error 1
    make[3]: Leaving directory `/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/drivers/hotplug'

    <-- snip -->

    The patch below fixes this issue by uninlining find_bus_wprev (as done
    in 2.6).

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

    --- linux-2.4.28-pre2-full/drivers/hotplug/ibmphp_res.c.old 2004-08-26 17:09:38.000000000 +0200
    +++ linux-2.4.28-pre2-full/drivers/hotplug/ibmphp_res.c 2004-08-26 17:10:16.000000000 +0200
    @@ -42,7 +42,7 @@
     static int update_bridge_ranges (struct bus_node **);
     static int add_range (int type, struct range_node *, struct bus_node *);
     static void fix_resources (struct bus_node *);
    -static inline struct bus_node *find_bus_wprev (u8, struct bus_node **, u8);
    +static struct bus_node *find_bus_wprev (u8, struct bus_node **, u8);
     
     static LIST_HEAD(gbuses);
     LIST_HEAD(ibmphp_res_head);
    @@ -1757,7 +1757,7 @@
             return find_bus_wprev (bus_number, NULL, 0);
     }
     
    -static inline struct bus_node *find_bus_wprev (u8 bus_number, struct bus_node **prev, u8 flag)
    +static struct bus_node *find_bus_wprev (u8 bus_number, struct bus_node **prev, u8 flag)
     {
             struct bus_node *bus_cur;
             struct list_head *tmp;
    -
    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: Clive Levinson: "Physical memory mapping with nopage handler"

    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)
    • [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)
    • [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)