[patch] 2.6.9-rc1-mm4: atyfb_base.c gcc 2.95 compile error

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

  • Next message: Gunnar Ritter: "Re: silent semantic changes with reiser4"
    Date:	Tue, 7 Sep 2004 21:26:16 +0200
    To: Andrew Morton <akpm@osdl.org>, "Antonino A. Daplas" <adaplas@hotpop.com>
    
    

    On Tue, Sep 07, 2004 at 02:08:31AM -0700, Andrew Morton wrote:
    >...
    > +fbdev-add-module_init-and-fb_get_options-per-driver.patch
    >
    > fbdev update
    >...

    gcc 2.95 doesn't support code mixed with variable declarations:

    <-- snip -->

    ...
      CC drivers/video/aty/atyfb_base.o
    drivers/video/aty/atyfb_base.c: In function `atyfb_init':
    drivers/video/aty/atyfb_base.c:1912: parse error before `unsigned'
    ...
    make[3]: *** [drivers/video/aty/atyfb_base.o] Error 1

    <-- snip -->

    A possible fix is below.

    BTW (not related to this patch):
    Why are #ifdef __sparc__ in the #else branch of an #ifdef __sparc__
    (e.g. line 2225)???

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

    --- linux-2.6.9-rc1-mm4-full/drivers/video/aty/atyfb_base.c.old 2004-09-07 21:11:52.000000000 +0200
    +++ linux-2.6.9-rc1-mm4-full/drivers/video/aty/atyfb_base.c 2004-09-07 21:18:01.000000000 +0200
    @@ -1900,37 +1900,42 @@
             printk("fb%d: %s frame buffer device on %s\n",
                    info->node, info->fix.id, name);
             return 1;
     }
     
     int __init atyfb_init(void)
     {
    -#ifndef MODULE
    - atyfb_setup(fb_get_options("atyfb"));
    -#endif
    -
     #if defined(CONFIG_PCI)
             unsigned long addr, res_start, res_size;
             struct atyfb_par *default_par;
             struct pci_dev *pdev = NULL;
             struct fb_info *info;
             int i;
     #ifdef __sparc__
             extern void (*prom_palette) (int);
             extern int con_is_present(void);
             struct pcidev_cookie *pcp;
             char prop[128];
             int node, len, j;
             u32 mem, chip_id;
    +#else
    + u16 tmp;
    +#endif
    +#endif
     
    +#ifndef MODULE
    + atyfb_setup(fb_get_options("atyfb"));
    +#endif
    +
    +#if defined(CONFIG_PCI)
    +
    +#ifdef __sparc__
             /* Do not attach when we have a serial console. */
             if (!con_is_present())
                     return -ENXIO;
    -#else
    - u16 tmp;
     #endif
     
             while ((pdev =
                     pci_find_device(PCI_VENDOR_ID_ATI, PCI_ANY_ID, pdev))) {
                     if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
                             struct resource *rp;
     

    -
    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: Gunnar Ritter: "Re: silent semantic changes with reiser4"

    Relevant Pages

    • [Patch 24a/23] mask v2 - UP fix, faster mask_of_bit, MASK_ALL* names
      ... Patch 24/23 was fouled up beyond all recall. ... It closely follows some excellent suggestions from Matthew. ... 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] net/ipv6/: misc cleanups
      ... OK, updated patch below. ... static void sf_markstate(struct ifmcaddr6 *pmc); ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [BK PATCHES] 2.6.x net driver updates
      ... through these ChangeSets: ... This patch does an indentation fix to amd8111e_rx_pollwhich was ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.3-mm3 hangs on boot x440 (scsi?)
      ... any ideas why the patch fails if the system has an ACPI ... expanded-pci-config-space.patch and tell me whether it continues to fail ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: memory leaks in 2.6.6...
      ... > Thanks to smatch I have found few memory leaks and other related issues ... See the patch in attachment. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)