isdn: fix section mismatch warnings from hisax_cs_setup_card
Subsystems (2)
PATCH 1/1 isdn: fix section mismatch warnings from hisax_cs_setup_card
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.
---
--- drivers/isdn/hisax/config.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/isdn/hisax/config.c +5 -2
@@ -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;
Signature · 1 line
1.5.4.rc3.14.g44397
PATCH 1/1 isdn: fix section mismatch warning for ISACVer
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.
--- drivers/isdn/hisax/avm_a1p.c | 3 +-- drivers/isdn/hisax/isac.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/isdn/hisax/avm_a1p.c +1 -2
@@ -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;
drivers/isdn/hisax/isac.c +1 -2
@@ -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;
Signature · 1 line
1.5.4.rc3.14.g44397
David Miller
maintainerRe: [PATCH] isdn: fix section mismatch warning for ISACVer
From: Sam Ravnborg <[email protected]>
Date: Fri, 8 Feb 2008 21:00:02 +0100
Quoted 9 lines
Fix following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the functionISACVersion()to the variable .devinit.data:ISACVer
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the functionsetup_avm_a1_pcmcia()to the function .devinit.text:setup_isac()ISACVer were only used from function annotated
__devinitso add same annotation to ISACVer.
One af the fererencing functions missed__devinitso add it and kill an additional warning.
Quoted 4 lines
Signed-off-by Sam Ravnborg <[email protected]>Acked-by Karsten Keil <[email protected]>Cc Jeff Garzik <[email protected]>Cc David Miller <[email protected]>
Also applied, thanks a lot Sam!
PATCH 1/1 isdn: fix section mismatch warnings in isac.c and isar.c
In reply to Sam RavnborgFix 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.
--- drivers/isdn/hisax/isac.c | 6 ++---- drivers/isdn/hisax/isar.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-)
drivers/isdn/hisax/isac.c +2 -4
@@ -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;
drivers/isdn/hisax/isar.c +1 -2
@@ -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;
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c
From: Sam Ravnborg <[email protected]>
Date: Fri, 8 Feb 2008 21:00:03 +0100
Quoted 1 line
Fix the following warnings:
...
Quoted 11 lines
initisar(),initisac()andclear_pending_isac_ints()were all used via a cardmsg fnction - which may be called ouside__devinitcontext.
So remove the bogus__devinitannotation of the above three functions to fix the warnings.Signed-off-by Sam Ravnborg <[email protected]>Acked-by Karsten Keil <[email protected]>Cc Jeff Garzik <[email protected]>Cc David Miller <[email protected]>
Applied.
PATCH 1/1 isdn: fix section mismatch warning in hfc_sx.c
In reply to Sam RavnborgFix 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.
--- drivers/isdn/hisax/hfc_sx.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/isdn/hisax/hfc_sx.c +1 -2
@@ -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;
Signature · 1 line
1.5.4.rc3.14.g44397
Re: [PATCH] isdn: fix section mismatch warning in hfc_sx.c
From: Sam Ravnborg <[email protected]>
Date: Fri, 8 Feb 2008 21:00:04 +0100
Quoted 9 lines
Fix the following warning:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the functionhfcsx_card_msg()to the function .devinit.text:inithfcsx()
hfcsx_card_msg()may be called outside__devinitcontext. Following the program logic is looks like theCARD_INITbranch will only be taken under__devinitcontext but to be consistent remove the__devinitannotation ofinithfcsx()so we do not mix non-__devinit and__devinitcode.
Quoted 4 lines
Signed-off-by Sam Ravnborg <[email protected]>Acked-by Karsten Keil <[email protected]>Cc Jeff Garzik <[email protected]>Cc David Miller <[email protected]>
Applied.
From: Sam Ravnborg <[email protected]>
Date: Fri, 8 Feb 2008 21:00:01 +0100
Quoted 1 line
Fix the following warnings:
...
Quoted 8 lines
checkcard()are the only user ofhisax_cs_setup_card(). And checkcard is only used during init or when hot plugging ISDN devices. So annotatehisax_cs_setup_card()with__devinit.checkcard()is used by exported functions so it cannot be annotated__devinit. Annotate it with__refso modpost ignore references to_devinitsection.
Quoted 4 lines
Signed-off-by Sam Ravnborg <[email protected]>Acked-by Karsten Keil <[email protected]>Cc Jeff Garzik <[email protected]>Cc David Miller <[email protected]>
Applied.