[PATCH 1/2 RFC] staging: ks7010: fix location of declaration

Nicholas Mc Guire hofrat at osadl.org
Wed Jul 27 12:23:36 UTC 2016

fix sparse warning by moving the extern declaration to device scope header 

Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")

Signed-off-by: Nicholas Mc Guire <hofrat at osadl.org>

sparse warning:

drivers/staging/ks7010/ks_wlan_net.c:3392:6: warning: symbol 'send_packet_complete' was not declared. Should it be static?

was caused by build dependencies being resolved locally rather
than at device level.

Compile tested with: x86_64_defconfig + CONFIG_STAGING=y

Patch is against 4.7-rc7 (localversion-next -next-20160727)

 drivers/staging/ks7010/ks_hostif.c | 1 -
 drivers/staging/ks7010/ks_wlan.h   | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a8822fe..e5e43c8 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -24,7 +24,6 @@ extern int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p,
 			 unsigned long size,
 			 void (*complete_handler) (void *arg1, void *arg2),
 			 void *arg1, void *arg2);
-extern void send_packet_complete(void *, void *);
 extern void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
 extern int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index f05dc01..b4d2f51 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -501,5 +501,6 @@ struct ks_wlan_private {
 extern int ks_wlan_net_start(struct net_device *dev);
 extern int ks_wlan_net_stop(struct net_device *dev);
+extern void send_packet_complete(void *, void *);
 #endif /* _KS_WLAN_H */

More information about the devel mailing list