Messages in this thread Patch in this message | | | Date | Mon, 27 Dec 1999 11:18:24 +0100 | From | Martin Mares <> | Subject | Re: pre-2.3.35-4,6 fail compile (pci.c) |
| |
Hello,
> gcc -D__KERNEL__ -I/hdb3/usr/src/linux-2.3.35/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -DCPU=586 -c -o pci.o pci.c > pci.c:415: parse error before `struct' > pci.c:422: invalid type argument of `unary *' > pci.c:422: warning: initialization makes integer from pointer without a cast > pci.c:422: initializer element is not constant > pci.c:422: warning: data definition has no type or storage class > pci.c:423: parse error before `0' > pci.c:448: parse error before `int'
It's due to older gcc being more picky about __init placement. Here is a fix.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/ "f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng."
--- drivers/pci/pci.c.mj Mon Dec 27 11:01:46 1999 +++ drivers/pci/pci.c Mon Dec 27 11:01:46 1999 @@ -412,7 +412,7 @@ } } -static __init struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) +static struct pci_bus * __init pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) { struct pci_bus *child; @@ -445,7 +445,7 @@ * A CardBus bridge is basically the same as a regular PCI bridge, * except we don't scan behind it because it will be changing. */ -static __init int pci_scan_cardbus(struct pci_bus *bus, struct pci_dev *dev, int busnr) +static int __init pci_scan_cardbus(struct pci_bus *bus, struct pci_dev *dev, int busnr) { unsigned short cr; unsigned int buses; @@ -500,7 +500,7 @@ /* * If it's a bridge, scan the bus behind it. */ -static __init int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max) +static int __init pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max) { unsigned int buses; unsigned short cr; @@ -566,7 +566,7 @@ * Read interrupt line and base address registers. * The architecture-dependent code can tweak these, of course. */ -static __init void pci_read_irq(struct pci_dev *dev) +static void __init pci_read_irq(struct pci_dev *dev) { unsigned char irq; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |