From: Himangi Saraogi Date: Sat, 2 Nov 2013 12:41:44 +0000 (+0530) Subject: staging:wlan-ng:hfa384x.h: remove typedef struct hfa384x_bytestr __packed hfa384x_byt... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b21199116a0ed9a27326b0cb85b1cdcc3997b879;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging:wlan-ng:hfa384x.h: remove typedef struct hfa384x_bytestr __packed hfa384x_bytestr_t 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 Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 3dfa85ccc504..333a2f693e49 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -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; diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index d22db43e8031..a9909f6b0001 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -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; diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index 07eecebeb6cc..190d390c8490 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -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); diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index d3a06fa0b4f6..9b5f3b72d3ca 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -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); diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 76374b220228..46f9491d10d3 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -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 */