linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Andrew Morton <akpm@osdl.org>, "Antonino A. Daplas" <adaplas@hotpop.com>
Cc: linux-kernel@vger.kernel.org, jsimmons@infradead.org,
	geert@linux-m68k.org, linux-fbdev-devel@lists.sourceforge.net
Subject: [patch] 2.6.9-rc1-mm4: atyfb_base.c gcc 2.95 compile error
Date: Tue, 7 Sep 2004 21:26:16 +0200	[thread overview]
Message-ID: <20040907192616.GC2454@fs.tum.de> (raw)
In-Reply-To: <20040907020831.62390588.akpm@osdl.org>

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;
 


  parent reply	other threads:[~2004-09-07 19:31 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-07  9:08 2.6.9-rc1-mm4 Andrew Morton
2004-09-07 11:59 ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 14:24   ` 2.6.9-rc1-mm4 Kasper Sandberg
2004-09-07 14:32     ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 17:04       ` 2.6.9-rc1-mm4 Francois Romieu
2004-09-07 18:30         ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 12:05 ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 12:21 ` 2.6.9-rc1-mm4 Simon Derr
2004-09-08  8:47   ` 2.6.9-rc1-mm4 Andrew Morton
2004-09-08  8:54     ` 2.6.9-rc1-mm4 Simon Derr
2004-09-08 12:06     ` [PATCH] Move syscall declarations from linux/key.h David Howells
2004-09-08 12:17     ` [PATCH] Move syscall declarations from linux/key.h [try #2] David Howells
2004-09-08  9:30   ` [PATCH] Remove syscall declarations from linux/key.h David Howells
2004-09-08 11:23     ` Arnd Bergmann
2004-09-08  9:37   ` 2.6.9-rc1-mm4 David Howells
2004-09-07 14:31 ` 2.6.9-rc1-mm4 Norberto Bensa
2004-09-07 15:45 ` 2.6.9-rc1-mm4 Zwane Mwaikambo
2004-09-07 16:46 ` 2.6.9-rc1-mm4 Danny ter Haar
2004-09-07 22:12   ` Killer CacheFS [was Re: 2.6.9-rc1-mm4] J.A. Magallon
2004-09-07 18:43 ` [patch] 2.6.9-rc1-mm4: small LOCALVERSION help text corrections Adrian Bunk
2004-09-07 21:27   ` Sam Ravnborg
2004-09-07 19:42     ` Adrian Bunk
2004-09-07 23:26   ` Ian Wienand
2004-09-07 19:02 ` [patch] 2.6.9-rc1-mm4: Makefile: remove tabs from empty lines Adrian Bunk
2004-09-07 21:14   ` Sam Ravnborg
2004-09-07 19:40     ` Adrian Bunk
2004-09-08  5:51     ` Dmitry Torokhov
2004-09-08  8:17       ` Sam Ravnborg
2004-09-07 19:26 ` Adrian Bunk [this message]
2004-09-08  0:38   ` [Linux-fbdev-devel] [patch] 2.6.9-rc1-mm4: atyfb_base.c gcc 2.95 compile error Antonino A. Daplas
2004-09-07 20:01 ` 2.6.9-rc1-mm4 Lorenzo Allegrucci
2004-09-07 20:23   ` 2.6.9-rc1-mm4 Nathan Bryant
2004-09-07 21:07     ` 2.6.9-rc1-mm4 Bjorn Helgaas
2004-09-08  8:15     ` 2.6.9-rc1-mm4 Lorenzo Allegrucci
2004-09-07 21:47 ` 2.6.9-rc1-mm4 (compile stats) John Cherry
2004-09-07 21:58   ` John Cherry
2004-09-08 13:00 ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-08 13:10 ` 2.6.9-rc1-mm4 David Howells
2004-09-08 20:16 ` 2.6.9-rc1-mm4 Nathan Lynch
2004-09-09  2:01 ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-09  2:30   ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-09 18:04 ` 2.6.9-rc1-mm4 Pasi Savolainen
2004-09-09 19:33   ` 2.6.9-rc1-mm4 Pasi Savolainen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040907192616.GC2454@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=adaplas@hotpop.com \
    --cc=akpm@osdl.org \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).