From: Adrian Bunk <bunk@fs.tum.de>
To: Alan Cox <alan@redhat.com>, James Simmons <jsimmons@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] 2.5.62-ac1: fix the compilation of aty128fb.c
Date: Fri, 21 Feb 2003 16:27:25 +0100 [thread overview]
Message-ID: <20030221152725.GQ531@fs.tum.de> (raw)
In-Reply-To: <200302202233.h1KMX8408821@devserv.devel.redhat.com>
On Thu, Feb 20, 2003 at 05:33:08PM -0500, Alan Cox wrote:
>...
> Linux 2.5.62-ac1
>...
> o FBdev updates (James Simmons)
>...
gcc 2.95 doesn't like variable declarations in the middle of a function:
<-- snip -->
...
gcc -Wp,-MD,drivers/video/.aty128fb.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=k6 -Iinclude/asm-i386/mach-default -nostdinc
-iwithprefix include -DKBUILD_BASENAME=aty128fb -DKBUILD_MODNAME=aty128fb -c -o drivers
/video/aty128fb.o drivers/video/aty128fb.c
drivers/video/aty128fb.c: In function `aty128_map_ROM':
drivers/video/aty128fb.c:1811: parse error before `unsigned'
drivers/video/aty128fb.c:1814: `addr' undeclared (first use in this function)
drivers/video/aty128fb.c:1814: (Each undeclared identifier is reported only once
drivers/video/aty128fb.c:1814: for each function it appears in.)
drivers/video/aty128fb.c: In function `aty128_unmap_ROM':
drivers/video/aty128fb.c:1827: parse error before `struct'
drivers/video/aty128fb.c:1828: `r' undeclared (first use in this function)
make[2]: *** [drivers/video/aty128fb.o] Error 1
<-- snip -->
The following patch fixes the compilation:
--- linux-2.5.62-ac/drivers/video/aty128fb.c.old 2003-02-21 16:14:58.000000000 +0100
+++ linux-2.5.62-ac/drivers/video/aty128fb.c 2003-02-21 16:21:02.000000000 +0100
@@ -1793,6 +1793,8 @@
#if !defined(CONFIG_PPC) && !defined(__sparc__)
static void * __init aty128_map_ROM(struct pci_dev *dev)
{
+ unsigned char *addr;
+
// If this is a primary card, there is a shadow copy of the
// ROM somewhere in the first meg. We will just ignore the copy
// and use the ROM directly.
@@ -1808,7 +1810,7 @@
if (!(r->flags & PCI_ROM_ADDRESS_ENABLE))
pci_write_config_dword(dev, dev->rom_base_reg, r->start | PCI_ROM_ADDRESS_ENABLE);
- unsigned char *addr = ioremap(r->start, r->end - r->start + 1);
+ addr = ioremap(r->start, r->end - r->start + 1);
// Very simple test to make sure it appeared
if (addr && (*addr != 0x55)) {
@@ -1821,10 +1823,12 @@
static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom)
{
+ struct resource *r;
+
iounmap(rom);
// leave it disabled and unassigned
- struct resource *r = &dev->resource[PCI_ROM_RESOURCE];
+ r = &dev->resource[PCI_ROM_RESOURCE];
r->flags &= !PCI_ROM_ADDRESS_ENABLE;
r->end -= r->start;
r->start = 0;
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
prev parent reply other threads:[~2003-02-21 15:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 22:33 Linux 2.5.62-ac1 Alan Cox
2003-02-20 23:05 ` Tomas Szepe
2003-02-20 23:06 ` Alan Cox
2003-02-20 23:09 ` Tomas Szepe
2003-02-20 23:31 ` Steven Cole
2003-02-20 23:57 ` Alan Cox
2003-02-21 1:48 ` Steven Cole
2003-02-21 15:09 ` Adrian Bunk
2003-02-21 15:12 ` Adrian Bunk
2003-02-21 16:31 ` James Simmons
2003-02-23 11:06 ` Geert Uytterhoeven
2003-02-25 16:26 ` James Simmons
2003-02-25 16:28 ` Geert Uytterhoeven
2003-02-21 15:27 ` Adrian Bunk [this message]
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=20030221152725.GQ531@fs.tum.de \
--to=bunk@fs.tum.de \
--cc=alan@redhat.com \
--cc=jsimmons@infradead.org \
--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
all inboxes | Powered by JetHome®