Skip to contentSkip to conversation

atm: fix horizon init section usage

PATCH In review Randy Dunlap 2 participants 6 messages Oct 23, 2006 – Oct 24, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atm: fix horizon init section usage

From: Randy Dunlap <[email protected]>

hrz_init() is called from the probe function, which is __devinit and could be called after init.

WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'

---

 drivers/atm/horizon.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/atm/horizon.c renamed from drivers/atm/horizon.c~atm_hrz_section +2 -1
diff -Naurp linux-2619-rc2g4/drivers/atm/horizon.c~atm_hrz_section linux-2619-rc2g4/drivers/atm/horizon.c
@@ -1845,7 +1845,8 @@ static u16 __init read_bia (const hrz_de
 
 /********** initialise a card **********/
 
-static int __init hrz_init (hrz_dev * dev) {
+static int hrz_init (hrz_dev * dev)
+{
   int onefivefive;
   
   u16 chan;

---

maintainer
#1 lore raw

From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700

Quoted 8 lines

From: Randy Dunlap <[email protected]>

hrz_init() is called from the probe function, which is __devinit and could be called after init.

WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'

It is only called from hrz_init() and thus shouldn't it be thus marked __devinit as well? That seems to be the right way to fix this one.

#2 lore raw
Quoted 8 lines · David Miller

From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700

Quoted 5 lines

From: Randy Dunlap <[email protected]>

hrz_init() is called from the probe function, which is __devinit and could be called after init.

Quoted 7 lines
Quoted 3 lines

WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'

It is only called from hrz_init() and thus shouldn't it be thus marked __devinit as well? That seems to be the right way to fix this one.

Oops, I agree. Want me to send another patch?

Signature · 1 line
~Randy
maintainer
#3 lore raw

From: "Randy.Dunlap" <[email protected]>
Date: Sun, 22 Oct 2006 21:32:20 -0700

Quoted 11 lines
Quoted 10 lines · David Miller

From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700

Quoted 7 lines

From: Randy Dunlap <[email protected]>

hrz_init() is called from the probe function, which is __devinit and could be called after init.

WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

It is only called from hrz_init() and thus shouldn't it be thus marked __devinit as well? That seems to be the right way to fix this one.

Oops, I agree. Want me to send another patch?

No need, I'll take care of it, thanks Randy.

#4 lore raw
Quoted 14 lines · David Miller

From: "Randy.Dunlap" <[email protected]>
Date: Sun, 22 Oct 2006 21:32:20 -0700

Quoted 11 lines
Quoted 10 lines · David Miller

From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700

Quoted 7 lines

From: Randy Dunlap <[email protected]>

hrz_init() is called from the probe function, which is __devinit and could be called after init.

WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

It is only called from hrz_init() and thus shouldn't it be thus marked __devinit as well? That seems to be the right way to fix this one.

Oops, I agree. Want me to send another patch?

No need, I'll take care of it, thanks Randy.

David,

FYI: read_bia() also needs to be changed from __init to __devinit since it's called from hrz_init().

Signature · 1 line
~Randy
maintainer
#5 lore raw

From: "Randy.Dunlap" <[email protected]>
Date: Mon, 23 Oct 2006 09:31:50 -0700

Quoted 2 lines

FYI: read_bia() also needs to be changed from __init to __devinit since it's called from hrz_init().

Thanks Randy, I've fixed this up in my tree too.