staging: wfx: remove spaces after cast operator
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 5 May 2020 12:37:56 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:26:43 +0000 (13:26 +0200)
The kernel coding style expects no space after cast operator. This patch
make the wfx driver compliant with this rule.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200505123757.39506-15-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hif_rx.c
drivers/staging/wfx/hif_tx.c
drivers/staging/wfx/hwio.c
drivers/staging/wfx/key.c
drivers/staging/wfx/main.c
drivers/staging/wfx/sta.c

index b786714..ac4ec4f 100644 (file)
@@ -263,7 +263,7 @@ static int hif_generic_indication(struct wfx_dev *wdev,
                return 0;
        case HIF_GENERIC_INDICATION_TYPE_STRING:
                dev_info(wdev->dev, "firmware says: %s\n",
-                        (char *) body->indication_data.raw_data);
+                        (char *)body->indication_data.raw_data);
                return 0;
        case HIF_GENERIC_INDICATION_TYPE_RX_STATS:
                mutex_lock(&wdev->rx_stats_lock);
index 96f13d9..b083fca 100644 (file)
@@ -106,7 +106,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request,
 
        if (ret &&
            (cmd == HIF_REQ_ID_READ_MIB || cmd == HIF_REQ_ID_WRITE_MIB)) {
-               mib_name = get_mib_name(((u16 *) request)[2]);
+               mib_name = get_mib_name(((u16 *)request)[2]);
                mib_sep = "/";
        }
        if (ret < 0)
@@ -470,7 +470,7 @@ int hif_map_link(struct wfx_vif *wvif, u8 *mac_addr, int flags, int sta_id)
 
        if (mac_addr)
                ether_addr_copy(body->mac_addr, mac_addr);
-       body->map_link_flags = *(struct hif_map_link_flags *) &flags;
+       body->map_link_flags = *(struct hif_map_link_flags *)&flags;
        body->peer_sta_id = sta_id;
        wfx_fill_header(hif, wvif->id, HIF_REQ_ID_MAP_LINK, sizeof(*body));
        ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);
index 051d4b2..d878cb3 100644 (file)
@@ -233,7 +233,7 @@ int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t len)
 {
        int ret;
 
-       WARN((long) buf & 3, "%s: unaligned buffer", __func__);
+       WARN((long)buf & 3, "%s: unaligned buffer", __func__);
        wdev->hwbus_ops->lock(wdev->hwbus_priv);
        ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv,
                                            WFX_REG_IN_OUT_QUEUE, buf, len);
@@ -249,7 +249,7 @@ int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t len)
 {
        int ret;
 
-       WARN((long) buf & 3, "%s: unaligned buffer", __func__);
+       WARN((long)buf & 3, "%s: unaligned buffer", __func__);
        wdev->hwbus_ops->lock(wdev->hwbus_priv);
        ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv,
                                          WFX_REG_IN_OUT_QUEUE, buf, len);
index ceb57cb..5ee2ffc 100644 (file)
@@ -228,7 +228,7 @@ int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
                struct ieee80211_key_conf *key)
 {
        int ret = -EOPNOTSUPP;
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
 
        mutex_lock(&wvif->wdev->conf_mutex);
        if (cmd == SET_KEY)
index de41f16..18c96b8 100644 (file)
@@ -390,7 +390,7 @@ int wfx_probe(struct wfx_dev *wdev)
                 wdev->hw_caps.firmware_build, wdev->hw_caps.firmware_label,
                 wdev->hw_caps.api_version_major,
                 wdev->hw_caps.api_version_minor,
-                wdev->keyset, *((u32 *) &wdev->hw_caps.capabilities));
+                wdev->keyset, *((u32 *)&wdev->hw_caps.capabilities));
        snprintf(wdev->hw->wiphy->fw_version,
                 sizeof(wdev->hw->wiphy->fw_version),
                 "%d.%d.%d",
index 999e0f0..1a876a0 100644 (file)
@@ -251,7 +251,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                   u16 queue, const struct ieee80211_tx_queue_params *params)
 {
        struct wfx_dev *wdev = hw->priv;
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
        int old_uapsd = wvif->uapsd_mask;
 
        WARN_ON(queue >= hw->queues);
@@ -345,8 +345,7 @@ static void wfx_set_mfp(struct wfx_vif *wvif,
 
        rcu_read_lock();
        if (bss)
-               ptr = (const u16 *) ieee80211_bss_get_ie(bss,
-                                                             WLAN_EID_RSN);
+               ptr = (const u16 *)ieee80211_bss_get_ie(bss, WLAN_EID_RSN);
 
        if (ptr) {
                ptr += pairwise_cipher_suite_count_offset;
@@ -411,8 +410,8 @@ static void wfx_do_join(struct wfx_vif *wvif)
 int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                struct ieee80211_sta *sta)
 {
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
-       struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *) &sta->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
+       struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *)&sta->drv_priv;
 
        spin_lock_init(&sta_priv->lock);
        sta_priv->vif_id = wvif->id;
@@ -432,8 +431,8 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                   struct ieee80211_sta *sta)
 {
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
-       struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *) &sta->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
+       struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *)&sta->drv_priv;
        int i;
 
        for (i = 0; i < ARRAY_SIZE(sta_priv->buffered); i++)
@@ -534,7 +533,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                          struct ieee80211_bss_conf *info, u32 changed)
 {
        struct wfx_dev *wdev = hw->priv;
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
        int i;
 
        mutex_lock(&wdev->conf_mutex);
@@ -703,7 +702,7 @@ void wfx_change_chanctx(struct ieee80211_hw *hw,
 int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                           struct ieee80211_chanctx_conf *conf)
 {
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
        struct ieee80211_channel *ch = conf->def.chan;
 
        WARN(wvif->channel, "channel overwrite");
@@ -716,7 +715,7 @@ void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw,
                              struct ieee80211_vif *vif,
                              struct ieee80211_chanctx_conf *conf)
 {
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
        struct ieee80211_channel *ch = conf->def.chan;
 
        WARN(wvif->channel != ch, "channel mismatch");
@@ -732,7 +731,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
        int i, ret = 0;
        struct wfx_dev *wdev = hw->priv;
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
 
        vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER |
                             IEEE80211_VIF_SUPPORTS_UAPSD |
@@ -799,7 +798,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
        struct wfx_dev *wdev = hw->priv;
-       struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
 
        wait_for_completion_timeout(&wvif->set_pm_mode_complete, msecs_to_jiffies(300));