]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Staging: ks7010: Remove extern keyword from function declaration
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 17 Sep 2016 07:39:13 +0000 (13:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Sep 2016 21:36:53 +0000 (23:36 +0200)
Remove extern specifier from function declaration as they have
it by default. Also move extern declaration from .c files to
their respective header file 'ks_hostif.h'. Coccinelle was used
to remove extern and other changes were done by hand.
Script:
@@
identifier func;
type T;
@@
- extern
T func(...);

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c
drivers/staging/ks7010/ks_hostif.h
drivers/staging/ks7010/ks_wlan.h
drivers/staging/ks7010/ks_wlan_ioctl.h
drivers/staging/ks7010/ks_wlan_net.c
drivers/staging/ks7010/michael_mic.h

index deb82ab6e4a35dc74535835c34f763a592c26e2c..eb0192da66c1f0b7acb61c923118008452c46772 100644 (file)
 /* Include Wireless Extension definition and check version */
 #include <net/iw_handler.h>    /* New driver API */
 
-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);
-
 /* macro */
 #define inc_smeqhead(priv) \
         ( priv->sme_i.qhead = (priv->sme_i.qhead + 1) % SME_EVENT_BUFF_SIZE )
index dc806b5b47be8b723924d5cbe6a6ad737c707080..ffd0174aaec37f5c9c4738669613e6834f11dc8f 100644 (file)
@@ -616,13 +616,21 @@ enum {
 #include "ks_wlan.h"
 
 /* function prototype */
-extern int hostif_data_request(struct ks_wlan_private *priv,
-                              struct sk_buff *packet);
-extern void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
-                          unsigned int size);
-extern void hostif_sme_enqueue(struct ks_wlan_private *priv, uint16_t event);
-extern int hostif_init(struct ks_wlan_private *priv);
-extern void hostif_exit(struct ks_wlan_private *priv);
+int hostif_data_request(struct ks_wlan_private *priv,
+                        struct sk_buff *packet);
+void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
+                    unsigned int size);
+void hostif_sme_enqueue(struct ks_wlan_private *priv, uint16_t event);
+int hostif_init(struct ks_wlan_private *priv);
+void hostif_exit(struct ks_wlan_private *priv);
+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);
+void send_packet_complete(void *, void *);
+
+void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
+int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
 
 static
 inline int hif_align_size(int size)
index f05dc0122fcbd14c220ad1c2692677af5d9cc977..693e7d8d35b4db81ad1cffef6cf9ad100688c50f 100644 (file)
@@ -499,7 +499,7 @@ struct ks_wlan_private {
        uint wakeup_count;      /* for detect wakeup loop */
 };
 
-extern int ks_wlan_net_start(struct net_device *dev);
-extern int ks_wlan_net_stop(struct net_device *dev);
+int ks_wlan_net_start(struct net_device *dev);
+int ks_wlan_net_stop(struct net_device *dev);
 
 #endif /* _KS_WLAN_H */
index 49369e4978087448fd2197bc43004ac757b19676..84554b6bb239fead91f9d8e0a889765d10799563 100644 (file)
@@ -58,9 +58,9 @@
 #include "ks_wlan.h"
 #include <linux/netdevice.h>
 
-extern int ks_wlan_read_config_file(struct ks_wlan_private *priv);
-extern int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
-                                  unsigned int commit_flag);
+int ks_wlan_read_config_file(struct ks_wlan_private *priv);
+int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
+                            unsigned int commit_flag);
 
 #endif /* __KERNEL__ */
 
index 70cc9bee96c1f0be0ada7c404794f8feac32129b..ee9c8f3828cfde606534b274b7441901dc8c17b2 100644 (file)
@@ -69,10 +69,6 @@ static const struct iw_handler_def ks_wlan_handler_def;
 /*
  *     function prototypes
  */
-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);
 static int ks_wlan_open(struct net_device *dev);
 static void ks_wlan_tx_timeout(struct net_device *dev);
 static int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev);
index c7e4eb2809610725cac438919f903eaf59ff1216..89f17d5ebd36386651662afd5205aa79becb212d 100644 (file)
@@ -20,7 +20,6 @@ struct michel_mic_t {
        uint8_t Result[8];
 };
 
-extern
 void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t * Key,
                        uint8_t * Data, int Len, uint8_t priority,
                        uint8_t * Result);