staging:wlan-ng:hfa384x.h: remove typedef struct hfa384x_bytestr __packed hfa384x_byt...
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 2 Nov 2013 12:41:44 +0000 (18:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2013 19:49:00 +0000 (11:49 -0800)
This patch removes the checkpatch.pl warning "do not add new typedefs"
and changes all source files that use that typedef. Also lines were
shortened to 80 characters to do away with the checkpatch.pl warning
"line over 80 characters" generated due to replacement of the
hfa384x_bytestr_t by struct hfa384x_bytestr in prism2mgmt.c,
prism2mgmt.h, prism2mib.c, prism2sta.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/hfa384x.h
drivers/staging/wlan-ng/prism2mgmt.c
drivers/staging/wlan-ng/prism2mgmt.h
drivers/staging/wlan-ng/prism2mib.c
drivers/staging/wlan-ng/prism2sta.c

index 3dfa85ccc50408bdccbc1129670472427ec2f04f..333a2f693e49682720d396fd2e24baeb049279e8 100644 (file)
@@ -350,10 +350,10 @@ PD Record codes
 
 /*-------------------------------------------------------------*/
 /* Commonly used basic types */
-typedef struct hfa384x_bytestr {
+struct hfa384x_bytestr {
        u16 len;
        u8 data[0];
-} __packed hfa384x_bytestr_t;
+} __packed;
 
 typedef struct hfa384x_bytestr32 {
        u16 len;
index d22db43e803199f122696f7ae7ec3c16ee2d6171..a9909f6b000114245052f4e3ba995154797143a8 100644 (file)
@@ -525,7 +525,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
 
        p80211pstrd_t *pstr;
        u8 bytebuf[80];
-       hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t *) bytebuf;
+       struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
        u16 word;
 
        wlandev->macmode = WLAN_MACMODE_NONE;
@@ -1019,7 +1019,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
        struct p80211msg_lnxreq_autojoin *msg = msgp;
        p80211pstrd_t *pstr;
        u8 bytebuf[256];
-       hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t *) bytebuf;
+       struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
 
        wlandev->macmode = WLAN_MACMODE_NONE;
 
index 07eecebeb6ccb476c3759aea3e87037512c0b45a..190d390c8490ac0c77a06cab7358da0d37fe4601 100644 (file)
@@ -92,8 +92,10 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
 void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
 
 /* byte string conversion functions*/
-void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
-void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
+void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
+                            p80211pstrd_t *pstr);
+void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
+                            p80211pstrd_t *pstr);
 
 /* functions to convert Group Addresses */
 void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv);
index d3a06fa0b4f6ad934b3025b94d9be2c631b0f41d..9b5f3b72d3cac36552903062297c8a0956fbe025 100644 (file)
@@ -763,7 +763,8 @@ static int prism2mib_priv(struct mibrec *mib,
 *
 ----------------------------------------------------------------*/
 
-void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
+void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
+                            p80211pstrd_t *pstr)
 {
        bytestr->len = cpu_to_le16((u16) (pstr->len));
        memcpy(bytestr->data, pstr->data, pstr->len);
@@ -804,7 +805,8 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
 *
 ----------------------------------------------------------------*/
 
-void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
+void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
+                            p80211pstrd_t *pstr)
 {
        pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len)));
        memcpy(pstr->data, bytestr->data, pstr->len);
index 76374b2202285b201981fd6c618c7fc744e72ff0..46f9491d10d3ce92252665615d35ec747e5db37d 100644 (file)
@@ -1279,7 +1279,7 @@ void prism2sta_processing_defer(struct work_struct *data)
                                     HFA384x_RID_CURRENTSSID, result);
                                return;
                        }
-                       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+                       prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
                                                (p80211pstrd_t *) &
                                                wlandev->ssid);
 
@@ -1361,7 +1361,7 @@ void prism2sta_processing_defer(struct work_struct *data)
                                 HFA384x_RID_CURRENTSSID, result);
                        return;
                }
-               prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+               prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
                                        (p80211pstrd_t *) &wlandev->ssid);
 
                hw->link_status = HFA384x_LINK_CONNECTED;
@@ -2037,7 +2037,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
                         HFA384x_RID_CURRENTSSID, result);
                return;
        }
-       prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+       prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
                                (p80211pstrd_t *) &wlandev->ssid);
 
        /* Reschedule timer */