2001-12-06 15:13:15

by Adrian Bunk

[permalink] [raw]
Subject: ISDN compile broken since 2.4.17-pre3

Hi,

2.4.17-pre3 adds the files hisax_isac.{c,h}. The problem is that they
define a function isac_interrupt that is different from the one already
present in isac.{c,h}. This produces the following error when you use a
.config that tries to compile both files into the kernel:

...
ld -m elf_i386 -r -o vmlinux-obj.o hisax.o sedlbauer_cs.o elsa_cs.o
hisax_st5481.o hisax_isac.o hisax_fcpcipnp.o
hisax_isac.o: In function `isac_interrupt':
hisax_isac.o(.text+0x630): multiple definition of `isac_interrupt'
hisax.o(.text+0x497b8): first defined here
ld: Warning: size of symbol `isac_interrupt' changed from 3038 to 1373 in
hisax_isac.o
make[4]: *** [vmlinux-obj.o] Error 1
make[4]: Leaving directory `/mnt/kernel/linux/drivers/isdn/hisax'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/mnt/kernel/linux/drivers/isdn/hisax'
make[2]: *** [_subdir_hisax] Error 2
make[2]: Leaving directory `/mnt/kernel/linux/drivers/isdn'
make[1]: *** [_subdir_isdn] Error 2
make[1]: Leaving directory `/mnt/kernel/linux/drivers'
make: *** [_dir_drivers] Error 2


cu
Adrian

--

Get my GPG key: finger [email protected] | gpg --import

Fingerprint: B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400



2001-12-06 18:52:02

by Kai Germaschewski

[permalink] [raw]
Subject: Re: ISDN compile broken since 2.4.17-pre3

On Thu, 6 Dec 2001, Adrian Bunk wrote:

> 2.4.17-pre3 adds the files hisax_isac.{c,h}. The problem is that they
> define a function isac_interrupt that is different from the one already
> present in isac.{c,h}. This produces the following error when you use a
> .config that tries to compile both files into the kernel:

Uh-oh, you're right. Here's a patch which renames the new function (and
some others, for consistency).

Marcelo, please apply.

--Kai

diff -X excl -urN linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_fcpcipnp.c linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_fcpcipnp.c
--- linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_fcpcipnp.c Thu Dec 6 19:16:40 2001
+++ linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_fcpcipnp.c Thu Dec 6 19:26:35 2001
@@ -533,7 +533,7 @@
dev_kfree_skb_irq(skb);
}

-static void hdlc_irq(struct fritz_bcs *bcs, u32 stat)
+static void hdlc_irq_one(struct fritz_bcs *bcs, u32 stat)
{
DBG(0x10, "ch%d stat %#x", bcs->channel, stat);
if (stat & HDLC_INT_RPR) {
@@ -550,7 +550,7 @@
}
}

-static inline void hdlc_interrupt(struct fritz_adapter *adapter)
+static inline void hdlc_irq(struct fritz_adapter *adapter)
{
int nr;
u32 stat;
@@ -559,7 +559,7 @@
stat = adapter->read_hdlc_status(adapter, nr);
DBG(0x10, "HDLC %c stat %#x", 'A' + nr, stat);
if (stat & HDLC_INT_MASK)
- hdlc_irq(&adapter->bcs[nr], stat);
+ hdlc_irq_one(&adapter->bcs[nr], stat);
}
}

@@ -642,10 +642,10 @@
return;
DBG(2, "STATUS0 %#x", val);
if (val & AVM_STATUS0_IRQ_ISAC)
- isacsx_interrupt(&adapter->isac);
+ isacsx_irq(&adapter->isac);

if (val & AVM_STATUS0_IRQ_HDLC)
- hdlc_interrupt(adapter);
+ hdlc_irq(adapter);
}

static void fcpci_irq(int intno, void *dev, struct pt_regs *regs)
@@ -659,10 +659,10 @@
return;
DBG(2, "sval %#x", sval);
if (!(sval & AVM_STATUS0_IRQ_ISAC))
- isac_interrupt(&adapter->isac);
+ isac_irq(&adapter->isac);

if (!(sval & AVM_STATUS0_IRQ_HDLC))
- hdlc_interrupt(adapter);
+ hdlc_irq(adapter);
}

// ----------------------------------------------------------------------
diff -X excl -urN linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_isac.c linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_isac.c
--- linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_isac.c Thu Dec 6 19:16:40 2001
+++ linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_isac.c Thu Dec 6 19:28:15 2001
@@ -601,7 +601,7 @@
}
}

-void isac_interrupt(struct isac *isac)
+void isac_irq(struct isac *isac)
{
unsigned char val;

@@ -741,7 +741,7 @@
}
}

-void isacsx_interrupt(struct isac *isac)
+void isacsx_irq(struct isac *isac)
{
unsigned char val;

@@ -887,10 +887,10 @@
EXPORT_SYMBOL(isac_d_l2l1);

EXPORT_SYMBOL(isacsx_setup);
-EXPORT_SYMBOL(isacsx_interrupt);
+EXPORT_SYMBOL(isacsx_irq);

EXPORT_SYMBOL(isac_setup);
-EXPORT_SYMBOL(isac_interrupt);
+EXPORT_SYMBOL(isac_irq);

module_init(hisax_isac_init);
module_exit(hisax_isac_exit);
diff -X excl -urN linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_isac.h linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_isac.h
--- linux-2.4.17-pre4.patches/drivers/isdn/hisax/hisax_isac.h Thu Dec 6 19:32:06 2001
+++ linux-2.4.17-pre4.work/drivers/isdn/hisax/hisax_isac.h Thu Dec 6 19:33:32 2001
@@ -37,9 +37,9 @@
void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg);

void isac_setup(struct isac *isac);
-void isac_interrupt(struct isac *isac);
+void isac_irq(struct isac *isac);

void isacsx_setup(struct isac *isac);
-void isacsx_interrupt(struct isac *isac);
+void isacsx_irq(struct isac *isac);

#endif