staging: wfx: replace uintXX_t to uXX
PATCH v2 1/3 staging: wfx: replace uintXX_t to uXX
Replace uint8_t to u8 and uint32_t to u32.
As per recommendation of checkpatch tool.
---
Changes
v1 did not include all the replacements in the driver v2 includes all replacements in the driver,
remove error of space and
merge u8 replacement file and u32 replacement file into one file.
between the identifier and variable.
drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/data_tx.c | 4 ++-- drivers/staging/wfx/data_tx.h | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-)
drivers/staging/wfx/bh.c +1 -1
@@ -239,7 +239,7 @@ static int bh_work_tx(struct wfx_dev *wdev, int max_msg)*/ static void ack_sdio_data (struct wfx_dev *wdev) { -uint32_t cfg_reg; +u32 cfg_reg;config_reg_read (wdev, &cfg_reg);if (cfg_reg &0xFF ) {
drivers/staging/wfx/data_tx.c +2 -2
@@ -107,7 +107,7 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy,for (i =0 ; i <IEEE80211_TX_MAX_RATES ; ++i) {int rateid; -uint8_t count; +u8 count;if (rates[i].idx <0 )break ;
@@ -546,7 +546,7 @@ static uint8_t wfx_tx_get_rate_id(struct wfx_vif *wvif, struct ieee80211_tx_info *tx_info) {bool tx_policy_renew = false; -uint8_t rate_id; +u8 rate_id; rate_id =wfx_tx_policy_get (wvif, tx_info->driver_rates, &tx_policy_renew);
drivers/staging/wfx/data_tx.h +9 -9
@@ -31,17 +31,17 @@ enum wfx_link_status {struct wfx_link_entry {unsigned long timestamp;enum wfx_link_status status; -uint8_t mac[ETH_ALEN ]; -uint8_t old_mac[ETH_ALEN ]; -uint8_t buffered[WFX_MAX_TID ]; +u8 mac[ETH_ALEN ]; +u8 old_mac[ETH_ALEN ]; +u8 buffered[WFX_MAX_TID ];struct sk_buff_head rx_queue; };struct tx_policy {struct list_head link; -uint8_t rates[12 ]; -uint8_t usage_count; -uint8_t uploaded; +u8 rates[12 ]; +u8 usage_count; +u8 uploaded; };struct tx_policy_cache {
@@ -55,9 +55,9 @@ struct tx_policy_cache {struct wfx_tx_priv {ktime_t xmit_timestamp;struct ieee80211_key_conf *hw_key; -uint8_t link_id; -uint8_t raw_link_id; -uint8_t tid; +u8 link_id; +u8 raw_link_id; +u8 tid; } __packed;void wfx_tx_policy_init (struct wfx_vif *wvif);
Signature · 1 line
2.23.0
PATCH v2 2/3 staging: wfx: remove space between cast and variable
Remove space between cast and variable to fix
checkpatch tool warning
"CHECK: No space is necessary after a cast"
---
v1 did not include all the checks fix in the driver v2 includes all the check fix in the driver
drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_tx.c | 4 ++-- drivers/staging/wfx/data_tx.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wfx/data_rx.c +1 -1
@@ -50,7 +50,7 @@ static int wfx_handle_pspoll(struct wfx_vif *wvif, struct sk_buff *skb)static int wfx_drop_encrypt_data (struct wfx_dev *wdev,struct hif_ind_rx *arg,struct sk_buff *skb) { -struct ieee80211_hdr *frame = (struct ieee80211_hdr *) skb->data; +struct ieee80211_hdr *frame = (struct ieee80211_hdr *)skb->data;size_t hdrlen =ieee80211_hdrlen (frame->frame_control);size_t iv_len, icv_len;
drivers/staging/wfx/data_tx.c +2 -2
@@ -482,7 +482,7 @@ static uint8_t wfx_tx_get_raw_link_id(struct wfx_vif *wvif, struct ieee80211_hdr *hdr) {struct wfx_sta_priv *sta_priv = - sta ? (struct wfx_sta_priv *) &sta->drv_priv :NULL ; + sta ? (struct wfx_sta_priv *)&sta->drv_priv :NULL ;const u8 *da =ieee80211_get_DA (hdr);int ret;
@@ -615,7 +615,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta,struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;int queue_id = tx_info->hw_queue; -size_t offset = (size_t ) skb->data &3 ; +size_t offset = (size_t )skb->data &3 ;int wmsg_len =sizeof (struct hif_msg ) +sizeof (struct hif_req_tx ) + offset;
drivers/staging/wfx/data_tx.h +1 -1
@@ -85,7 +85,7 @@ static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb)static inline struct hif_req_tx *wfx_skb_txreq (struct sk_buff *skb) {struct hif_msg *hif = (struct hif_msg *)skb->data; -struct hif_req_tx *req = (struct hif_req_tx *) hif->body; +struct hif_req_tx *req = (struct hif_req_tx *)hif->body;return req; }
Signature · 1 line
2.23.0
PATCH v2 3/3 staging: wfx: remove unnecessary empty space before a curly brace
In reply to Jules IrengeRemove unnecessary empty space before a closing curly brace. As per recommendation of checkpatch tool.
---
v1 and v2 are the same.
drivers/staging/wfx/data_rx.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wfx/data_rx.c +0 -1
@@ -95,7 +95,6 @@ static int wfx_drop_encrypt_data(struct wfx_dev *wdev, struct hif_ind_rx *arg, smemmove (skb->data + iv_len, skb->data, hdrlen);skb_pull (skb, iv_len);return 0 ; - } void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg,
Signature · 1 line
2.23.0