diff options
author | Jules Irenge <jbi.octave@gmail.com> | 2019-10-19 17:07:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-26 21:43:46 +0300 |
commit | bc9496e5b4d603b1069a49422900a6b591f4d504 (patch) | |
tree | cd63f8ff8717230c313585bd8000fe3a447a7410 | |
parent | c22a3a9c0a87d2064cbe744b1b393569d0621474 (diff) | |
download | linux-bc9496e5b4d603b1069a49422900a6b591f4d504.tar.xz |
staging: wfx: fix warnings of no space is necessary
Fix warnings of no space is necessary after a cast.
Issue detected by checkpatch tool.
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191019140719.2542-2-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/wfx/bh.c | 8 | ||||
-rw-r--r-- | drivers/staging/wfx/bus_sdio.c | 6 | ||||
-rw-r--r-- | drivers/staging/wfx/bus_spi.c | 2 | ||||
-rw-r--r-- | drivers/staging/wfx/data_rx.c | 8 | ||||
-rw-r--r-- | drivers/staging/wfx/data_tx.c | 20 | ||||
-rw-r--r-- | drivers/staging/wfx/data_tx.h | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 3355183fc86c..573216b08042 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -69,13 +69,13 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) if (wfx_data_read(wdev, skb->data, alloc_len)) goto err; - piggyback = le16_to_cpup((u16 *) (skb->data + alloc_len - 2)); + piggyback = le16_to_cpup((u16 *)(skb->data + alloc_len - 2)); _trace_piggyback(piggyback, false); - hif = (struct hif_msg *) skb->data; + hif = (struct hif_msg *)skb->data; WARN(hif->encrypted & 0x1, "unsupported encryption type"); if (hif->encrypted == 0x2) { - if (wfx_sl_decode(wdev, (void *) hif)) { + if (wfx_sl_decode(wdev, (void *)hif)) { dev_kfree_skb(skb); // If frame was a confirmation, expect trouble in next // exchange. However, it is harmless to fail to decode @@ -102,7 +102,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) if (!(hif->id & HIF_ID_IS_INDICATION)) { (*is_cnf)++; if (hif->id == HIF_CNF_ID_MULTI_TRANSMIT) - release_count = le32_to_cpu(((struct hif_cnf_multi_transmit *) hif->body)->num_tx_confs); + release_count = le32_to_cpu(((struct hif_cnf_multi_transmit *)hif->body)->num_tx_confs); else release_count = 1; WARN(wdev->hif.tx_buffers_used < release_count, "corrupted buffer counter"); diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index f97360513150..184e20dfdd62 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -38,7 +38,7 @@ static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, int ret; WARN(reg_id > 7, "chip only has 7 registers"); - WARN(((uintptr_t) dst) & 3, "unaligned buffer size"); + WARN(((uintptr_t)dst) & 3, "unaligned buffer size"); WARN(count & 3, "unaligned buffer address"); /* Use queue mode buffers */ @@ -59,14 +59,14 @@ static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id, int ret; WARN(reg_id > 7, "chip only has 7 registers"); - WARN(((uintptr_t) src) & 3, "unaligned buffer size"); + WARN(((uintptr_t)src) & 3, "unaligned buffer size"); WARN(count & 3, "unaligned buffer address"); /* Use queue mode buffers */ if (reg_id == WFX_REG_IN_OUT_QUEUE) sdio_addr |= bus->buf_id_tx << 7; // FIXME: discards 'const' qualifier for src - ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *) src, count); + ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *)src, count); if (!ret && reg_id == WFX_REG_IN_OUT_QUEUE) bus->buf_id_tx = (bus->buf_id_tx + 1) % 32; diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index f65f7d75e731..effd07957753 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -90,7 +90,7 @@ static int wfx_spi_copy_to_io(void *priv, unsigned int addr, struct wfx_spi_priv *bus = priv; u16 regaddr = (addr << 12) | (count / 2); // FIXME: use a bounce buffer - u16 *src16 = (void *) src; + u16 *src16 = (void *)src; int ret, i; struct spi_message m; struct spi_transfer t_addr = { diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 3a79089c8501..3a79ab93e97e 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -29,7 +29,7 @@ static int wfx_handle_pspoll(struct wfx_vif *wvif, struct sk_buff *skb) rcu_read_lock(); sta = ieee80211_find_sta(wvif->vif, pspoll->ta); if (sta) - link_id = ((struct wfx_sta_priv *) &sta->drv_priv)->link_id; + link_id = ((struct wfx_sta_priv *)&sta->drv_priv)->link_id; rcu_read_unlock(); if (link_id) pspoll_mask = BIT(link_id); @@ -102,8 +102,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb { int link_id = arg->rx_flags.peer_sta_id; struct ieee80211_rx_status *hdr = IEEE80211_SKB_RXCB(skb); - struct ieee80211_hdr *frame = (struct ieee80211_hdr *) skb->data; - struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data; + struct ieee80211_hdr *frame = (struct ieee80211_hdr *)skb->data; + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; struct wfx_link_entry *entry = NULL; bool early_data = false; @@ -173,7 +173,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb tim_ie = cfg80211_find_ie(WLAN_EID_TIM, ies, ies_len); if (tim_ie) { - struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *) &tim_ie[2]; + struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *)&tim_ie[2]; if (wvif->dtim_period != tim->dtim_period) { wvif->dtim_period = tim->dtim_period; diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 8ed38cac19f6..cf73b83ccc9e 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -427,7 +427,7 @@ void wfx_link_id_work(struct work_struct *work) static bool ieee80211_is_action_back(struct ieee80211_hdr *hdr) { - struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) hdr; + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)hdr; if (!ieee80211_is_action(mgmt->frame_control)) return false; @@ -591,7 +591,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct struct wfx_tx_priv *tx_priv; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; int queue_id = tx_info->hw_queue; size_t offset = (size_t) skb->data & 3; int wmsg_len = sizeof(struct hif_msg) + sizeof(struct hif_req_tx) + offset; @@ -602,7 +602,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct // From now tx_info->control is unusable memset(tx_info->rate_driver_data, 0, sizeof(struct wfx_tx_priv)); // Fill tx_priv - tx_priv = (struct wfx_tx_priv *) tx_info->rate_driver_data; + tx_priv = (struct wfx_tx_priv *)tx_info->rate_driver_data; tx_priv->tid = wfx_tx_get_tid(hdr); tx_priv->raw_link_id = wfx_tx_get_raw_link_id(wvif, sta, hdr); tx_priv->link_id = tx_priv->raw_link_id; @@ -619,7 +619,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct skb_put(skb, wfx_tx_get_icv_len(tx_priv->hw_key)); skb_push(skb, wmsg_len); memset(skb->data, 0, wmsg_len); - hif_msg = (struct hif_msg *) skb->data; + hif_msg = (struct hif_msg *)skb->data; hif_msg->len = cpu_to_le16(skb->len); hif_msg->id = HIF_REQ_ID_TX; hif_msg->interface = wvif->id; @@ -631,7 +631,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct } // Fill tx request - req = (struct hif_req_tx *) hif_msg->body; + req = (struct hif_req_tx *)hif_msg->body; req->packet_id = queue_id << 16 | IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); req->data_flags.fc_offset = offset; req->queue_id.peer_sta_id = tx_priv->raw_link_id; @@ -654,7 +654,7 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct wfx_vif *wvif; struct ieee80211_sta *sta = control ? control->sta : NULL; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; size_t driver_data_room = FIELD_SIZEOF(struct ieee80211_tx_info, rate_driver_data); compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room, @@ -662,7 +662,7 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, WARN(skb->next || skb->prev, "skb is already member of a list"); // control.vif can be NULL for injected frames if (tx_info->control.vif) - wvif = (struct wfx_vif *) tx_info->control.vif->drv_priv; + wvif = (struct wfx_vif *)tx_info->control.vif->drv_priv; else wvif = wvif_iterate(wdev, NULL); if (WARN_ON(!wvif)) @@ -762,7 +762,7 @@ static void wfx_notify_buffered_tx(struct wfx_vif *wvif, struct sk_buff *skb, struct hif_req_tx *req) { struct ieee80211_sta *sta; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; int tid = wfx_tx_get_tid(hdr); int raw_link_id = req->queue_id.peer_sta_id; u8 *buffered; @@ -787,8 +787,8 @@ static void wfx_notify_buffered_tx(struct wfx_vif *wvif, struct sk_buff *skb, void wfx_skb_dtor(struct wfx_dev *wdev, 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_msg *hif = (struct hif_msg *)skb->data; + struct hif_req_tx *req = (struct hif_req_tx *)hif->body; struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); unsigned int offset = sizeof(struct hif_req_tx) + sizeof(struct hif_msg) + req->data_flags.fc_offset; diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 0a19ef10a4ab..f74d1988925d 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -79,12 +79,12 @@ static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb) if (!skb) return NULL; tx_info = IEEE80211_SKB_CB(skb); - return (struct wfx_tx_priv *) tx_info->rate_driver_data; + return (struct wfx_tx_priv *)tx_info->rate_driver_data; } static inline struct hif_req_tx *wfx_skb_txreq(struct sk_buff *skb) { - struct hif_msg *hif = (struct hif_msg *) skb->data; + struct hif_msg *hif = (struct hif_msg *)skb->data; struct hif_req_tx *req = (struct hif_req_tx *) hif->body; return req; |