netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card
@ 2008-02-08 20:00 Sam Ravnborg
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning for ISACVer Sam Ravnborg
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
  To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller

Fix the following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x722): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_teles3()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x72c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_s0box()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x736): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_telespci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x747): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_avm_pcipnp()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x74e): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_elsa()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x755): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_diva()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x75c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sedlbauer()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x763): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_s()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x76a): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcpci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x771): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcsx()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x778): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_niccy()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x77f): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_bkm_a4t()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x786): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sct_quadro()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x78d): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_gazel()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x794): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_w6692()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x79b): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_u()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x7a2): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_enternow_pci()

checkcard() are the only user of hisax_cs_setup_card().
And checkcard is only used during init or when hot plugging
ISDN devices. So annotate hisax_cs_setup_card() with __devinit.
checkcard() is used by exported functions so it cannot be
annotated __devinit. Annotate it with __ref so modpost
ignore references to _devinit section.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
---
 drivers/isdn/hisax/config.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 97097ef..a0ee43c 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -847,7 +847,7 @@ static int init_card(struct IsdnCardState *cs)
 	return 3;
 }
 
-static int hisax_cs_setup_card(struct IsdnCard *card)
+static int __devinit hisax_cs_setup_card(struct IsdnCard *card)
 {
 	int ret;
 
@@ -1166,7 +1166,10 @@ outf_cs:
 	return 0;
 }
 
-static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner)
+/* Used from an exported function but calls __devinit functions.
+ * Tell modpost not to warn (__ref)
+ */
+static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner)
 {
 	int ret;
 	struct IsdnCard *card = cards + cardnr;
-- 
1.5.4.rc3.14.g44397


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] isdn: fix section mismatch warning for ISACVer
  2008-02-08 20:00 [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card Sam Ravnborg
@ 2008-02-08 20:00 ` Sam Ravnborg
  2008-02-10  7:29   ` David Miller
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c Sam Ravnborg
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
  To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller

Fix following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the function ISACVersion() to the variable .devinit.data:ISACVer
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the function setup_avm_a1_pcmcia() to the function .devinit.text:setup_isac()

ISACVer were only used from function annotated __devinit
so add same annotation to ISACVer.
One af the fererencing functions missed __devinit so add it
and kill an additional warning.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
 drivers/isdn/hisax/avm_a1p.c |    3 +--
 drivers/isdn/hisax/isac.c    |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
index c87fa3f..3039c6d 100644
--- a/drivers/isdn/hisax/avm_a1p.c
+++ b/drivers/isdn/hisax/avm_a1p.c
@@ -213,8 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 	return 0;
 }
 
-int
-setup_avm_a1_pcmcia(struct IsdnCard *card)
+int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card)
 {
 	u_char model, vers;
 	struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index 4e9f238..6ae9dde 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -27,8 +27,7 @@ static char *ISACVer[] __devinitdata =
 {"2086/2186 V1.1", "2085 B1", "2085 B2",
  "2085 V2.3"};
 
-void
-ISACVersion(struct IsdnCardState *cs, char *s)
+void __devinit ISACVersion(struct IsdnCardState *cs, char *s)
 {
 	int val;
 
-- 
1.5.4.rc3.14.g44397


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c
  2008-02-08 20:00 [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card Sam Ravnborg
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning for ISACVer Sam Ravnborg
@ 2008-02-08 20:00 ` Sam Ravnborg
  2008-02-10  7:28   ` David Miller
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning in hfc_sx.c Sam Ravnborg
  2008-02-10  7:29 ` [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
  To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller

Fix the following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b276): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b286): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1fec7): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x21669): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x21671): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2991e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x29936): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2993e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisar()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e026): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e02e): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x37813): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x37823): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:initisac()

initisar(), initisac() and clear_pending_isac_ints()
were all used via a cardmsg fnction - which may be called
ouside __devinit context.
So remove the bogus __devinit annotation of the
above three functions to fix the warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
 drivers/isdn/hisax/isac.c |    6 ++----
 drivers/isdn/hisax/isar.c |    3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index 6ae9dde..07b1673 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -615,8 +615,7 @@ dbusy_timer_handler(struct IsdnCardState *cs)
 	}
 }
 
-void __devinit
-initisac(struct IsdnCardState *cs)
+void initisac(struct IsdnCardState *cs)
 {
 	cs->setstack_d = setstack_isac;
 	cs->DC_Close = DC_Close_isac;
@@ -647,8 +646,7 @@ initisac(struct IsdnCardState *cs)
 	cs->writeisac(cs, ISAC_MASK, 0x0);
 }
 
-void __devinit
-clear_pending_isac_ints(struct IsdnCardState *cs)
+void clear_pending_isac_ints(struct IsdnCardState *cs)
 {
 	int val, eval;
 
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index c547a66..bfeb9b6 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -1894,8 +1894,7 @@ isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
 	return(0);
 }
 
-void __devinit
-initisar(struct IsdnCardState *cs)
+void initisar(struct IsdnCardState *cs)
 {
 	cs->bcs[0].BC_SetStack = setstack_isar;
 	cs->bcs[1].BC_SetStack = setstack_isar;
-- 
1.5.4.rc3.14.g44397


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] isdn: fix section mismatch warning in hfc_sx.c
  2008-02-08 20:00 [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card Sam Ravnborg
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning for ISACVer Sam Ravnborg
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c Sam Ravnborg
@ 2008-02-08 20:00 ` Sam Ravnborg
  2008-02-10  7:27   ` David Miller
  2008-02-10  7:29 ` [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
  To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller

Fix the following warning:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the function hfcsx_card_msg() to the function .devinit.text:inithfcsx()

hfcsx_card_msg() may be called outside __devinit context.
Following the program logic is looks like the CARD_INIT branch
will only be taken under __devinit context but to be consistent
remove the __devinit annotation of inithfcsx() so we
do not mix non-__devinit and __devinit code.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
 drivers/isdn/hisax/hfc_sx.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 4fd09d2..05482d2 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -1330,8 +1330,7 @@ hfcsx_bh(struct work_struct *work)
 /********************************/
 /* called for card init message */
 /********************************/
-static void __devinit
-inithfcsx(struct IsdnCardState *cs)
+static void inithfcsx(struct IsdnCardState *cs)
 {
 	cs->setstack_d = setstack_hfcsx;
 	cs->BC_Send_Data = &hfcsx_send_data;
-- 
1.5.4.rc3.14.g44397


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] isdn: fix section mismatch warning in hfc_sx.c
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning in hfc_sx.c Sam Ravnborg
@ 2008-02-10  7:27   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-02-10  7:27 UTC (permalink / raw)
  To: sam; +Cc: netdev, jeff, jgarzik

From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri,  8 Feb 2008 21:00:04 +0100

> Fix the following warning:
> WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the function hfcsx_card_msg() to the function .devinit.text:inithfcsx()
> 
> hfcsx_card_msg() may be called outside __devinit context.
> Following the program logic is looks like the CARD_INIT branch
> will only be taken under __devinit context but to be consistent
> remove the __devinit annotation of inithfcsx() so we
> do not mix non-__devinit and __devinit code.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Acked-by: Karsten Keil <kkeil@suse.de>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: David Miller <davem@davemloft.net>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c Sam Ravnborg
@ 2008-02-10  7:28   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-02-10  7:28 UTC (permalink / raw)
  To: sam; +Cc: netdev, jeff, jgarzik

From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri,  8 Feb 2008 21:00:03 +0100

> Fix the following warnings:
 ...
> 
> initisar(), initisac() and clear_pending_isac_ints()
> were all used via a cardmsg fnction - which may be called
> ouside __devinit context.
> So remove the bogus __devinit annotation of the
> above three functions to fix the warnings.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Acked-by: Karsten Keil <kkeil@suse.de>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: David Miller <davem@davemloft.net>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card
  2008-02-08 20:00 [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card Sam Ravnborg
                   ` (2 preceding siblings ...)
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning in hfc_sx.c Sam Ravnborg
@ 2008-02-10  7:29 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-02-10  7:29 UTC (permalink / raw)
  To: sam; +Cc: netdev, jeff, jgarzik

From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri,  8 Feb 2008 21:00:01 +0100

> Fix the following warnings:
 ...
> 
> checkcard() are the only user of hisax_cs_setup_card().
> And checkcard is only used during init or when hot plugging
> ISDN devices. So annotate hisax_cs_setup_card() with __devinit.
> checkcard() is used by exported functions so it cannot be
> annotated __devinit. Annotate it with __ref so modpost
> ignore references to _devinit section.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Acked-by: Karsten Keil <kkeil@suse.de>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: David Miller <davem@davemloft.net>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] isdn: fix section mismatch warning for ISACVer
  2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning for ISACVer Sam Ravnborg
@ 2008-02-10  7:29   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-02-10  7:29 UTC (permalink / raw)
  To: sam; +Cc: netdev, jeff, jgarzik

From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri,  8 Feb 2008 21:00:02 +0100

> Fix following warnings:
> WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the function ISACVersion() to the variable .devinit.data:ISACVer
> WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the function setup_avm_a1_pcmcia() to the function .devinit.text:setup_isac()
> 
> ISACVer were only used from function annotated __devinit
> so add same annotation to ISACVer.
> One af the fererencing functions missed __devinit so add it
> and kill an additional warning.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Acked-by: Karsten Keil <kkeil@suse.de>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: David Miller <davem@davemloft.net>

Also applied, thanks a lot Sam!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-02-10  7:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 20:00 [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card Sam Ravnborg
2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning for ISACVer Sam Ravnborg
2008-02-10  7:29   ` David Miller
2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c Sam Ravnborg
2008-02-10  7:28   ` David Miller
2008-02-08 20:00 ` [PATCH] isdn: fix section mismatch warning in hfc_sx.c Sam Ravnborg
2008-02-10  7:27   ` David Miller
2008-02-10  7:29 ` [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card David Miller

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).