Skip to contentSkip to conversation

mISDN: fix sparse warnings

PATCH Superseded Hannes Eder 2 participants 3 messages Dec 10, 2008 Kernel janitors

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/9 mISDN: fix sparse warnings

Impact: make an exported symbol non static

Fix this warning:

drivers/isdn/hardware/mISDN/hfcmulti.c:176:1: warning: symbol 'plx_lock' shadows an earlier one drivers/isdn/hardware/mISDN/hfcmulti.c:175:19: originally declared here

---

Note that patch introduces this new warning:

drivers/isdn/hardware/mISDN/hfcmulti.c:175:12: warning: symbol 'plx_lock' was not declared. Should it be static?

Should 'plx_lock' be declared in a header file? Or is it really neccessart to export it?

 drivers/isdn/hardware/mISDN/hfcmulti.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/isdn/hardware/mISDN/hfcmulti.c +1 -1
index 599d832..b4595f7 100644
@@ -172,7 +172,7 @@ static int interrupt_registered;
 
 static struct hfc_multi *syncmaster;
 static int plxsd_master; /* if we have a master card (yet) */
-static spinlock_t plx_lock; /* may not acquire other lock inside */
+spinlock_t plx_lock; /* may not acquire other lock inside */
 EXPORT_SYMBOL(plx_lock);
 
 #define	TYP_E1		1
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 2 lines · Hannes Eder

Should 'plx_lock' be declared in a header file? Or is it really neccessart to export it?

As there is no other user, I vote for unexporting it.

#2 lore raw

Re: [PATCHv2 4/9] mISDN: fix sparse warning

Impact: un-export symbol 'plx_lock'

Fix this warning:

drivers/isdn/hardware/mISDN/hfcmulti.c:176:1: warning: symbol 'plx_lock' shadows an earlier one drivers/isdn/hardware/mISDN/hfcmulti.c:175:19: originally declared here

---

Quoted 5 lines · Jiri Slaby
Quoted 2 lines · Hannes Eder

Should 'plx_lock' be declared in a header file? Or is it really neccessart to export it?

As there is no other user, I vote for unexporting it.

In that case patch number 4 looks like this:

 drivers/isdn/hardware/mISDN/hfcmulti.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/isdn/hardware/mISDN/hfcmulti.c +0 -1
index 599d832..970201d 100644
@@ -173,7 +173,6 @@ static int interrupt_registered;
 static struct hfc_multi *syncmaster;
 static int plxsd_master; /* if we have a master card (yet) */
 static spinlock_t plx_lock; /* may not acquire other lock inside */
-EXPORT_SYMBOL(plx_lock);
 
 #define	TYP_E1		1
 #define	TYP_4S		4
Signature · 1 line
1.5.6.3