mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremiah Mahler <jmmahler@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Jeremiah Mahler <jmmahler@gmail.com>,
	Joel Pelaez Jorge <joelpelaez@gmail.com>,
	Andrea Merello <andrea.merello@gmail.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Joe Perches <joe@perches.com>,
	Himangi Saraogi <himangi774@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Ana Rey <anarey@gmail.com>, Chaitanya Hazarey <c@24.io>,
	Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
	Teodora Baluta <teobaluta@gmail.com>
Subject: [PATCH v3] staging: rtl8192u/ieee80211: Fix sparse ieee80211_debug_init/_exit not declared warning
Date: Tue, 12 Aug 2014 00:03:44 -0700	[thread overview]
Message-ID: <1407827024-14746-1-git-send-email-jmmahler@gmail.com> (raw)
In-Reply-To: <20140812041733.GA7613@hudson.localdomain>

A sparse warning is generated about 'ieee80211_debug_init' and
'ieee80211_debug_exit' not being declared.

  drivers/staging/rtl8192u/ieee80211/ieee80211_module.c:275:12: warning:
  symbol 'ieee80211_debug_init' was not declared. Should it be static?
  drivers/staging/rtl8192u/ieee80211/ieee80211_module.c:297:13: warning:
  symbol 'ieee80211_debug_exit' was not declared. Should it be static?

These functions are used outside of this file so using static will not
work.  The prototypes are given in r8192U_core.c but sparse nonetheless
still gives a warning.  Fix the sparse warning by moving these
prototypes from r8192U_core.c to ieee80211.h.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Joel Pelaez Jorge <joelpelaez@gmail.com>
Cc: Andrea Merello <andrea.merello@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Joe Perches <joe@perches.com>
Cc: Himangi Saraogi <himangi774@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: Ana Rey <anarey@gmail.com>
Cc: Chaitanya Hazarey <c@24.io>
Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Teodora Baluta <teobaluta@gmail.com>
---

Notes:
    Changes in v2:
    
      - remove #ifdef CONFIG_IEEE80211_DEBUG, not needed in header.
    
      - removed __init and __exit, not needed in header.
    
    Changes in v3:
    
      - remove the duplicate prototypes from r892U_core.c
    
      - (prototypes moved from r8192U_core.c to ieee80211.h)

 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++++
 drivers/staging/rtl8192u/r8192U_core.c         | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 1040bab..c118551 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2485,6 +2485,10 @@ extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_reques
 extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
 			     union iwreq_data *wrqu, char *b);
 
+/* ieee80211_module.c */
+extern int ieee80211_debug_init(void);
+extern void ieee80211_debug_exit(void);
+
 //extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
 extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
 
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..ee27bb3 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -5277,8 +5277,6 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf)
 }
 
 /* fun with the built-in ieee80211 stack... */
-extern int ieee80211_debug_init(void);
-extern void ieee80211_debug_exit(void);
 extern int ieee80211_crypto_init(void);
 extern void ieee80211_crypto_deinit(void);
 extern int ieee80211_crypto_tkip_init(void);
-- 
2.1.0.rc1


      reply	other threads:[~2014-08-12  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 22:15 [PATCH] " Jeremiah Mahler
2014-08-11 22:32 ` Greg Kroah-Hartman
2014-08-12  1:49   ` [PATCH v2] " Jeremiah Mahler
2014-08-12  3:11   ` [PATCH] " Joel Pelaez Jorge
2014-08-12  4:17     ` Jeremiah Mahler
2014-08-12  7:03       ` Jeremiah Mahler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407827024-14746-1-git-send-email-jmmahler@gmail.com \
    --to=jmmahler@gmail.com \
    --cc=anarey@gmail.com \
    --cc=andrea.merello@gmail.com \
    --cc=arnd@arndb.de \
    --cc=c@24.io \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himangi774@gmail.com \
    --cc=joe@perches.com \
    --cc=joelpelaez@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=teobaluta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®