brcmsmac: make brcms_c_stf_ss_update() void
authorJason Yan <yanaijie@huawei.com>
Mon, 13 Apr 2020 08:21:26 +0000 (16:21 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Apr 2020 08:47:41 +0000 (11:47 +0300)
Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c:309:5-13:
Unneeded variable: "ret_code". Return "0" on line 328

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200413082126.22572-1-yanaijie@huawei.com
drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c
drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.h

index 0ab865d..79d4a7a 100644 (file)
@@ -304,9 +304,8 @@ int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force)
  * update wlc->stf->ss_opmode which represents the operational stf_ss mode
  * we're using
  */
-int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
+void brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
 {
-       int ret_code = 0;
        u8 prev_stf_ss;
        u8 upd_stf_ss;
 
@@ -325,7 +324,7 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
                                    PHY_TXC1_MODE_SISO : PHY_TXC1_MODE_CDD;
        } else {
                if (wlc->band != band)
-                       return ret_code;
+                       return;
                upd_stf_ss = (wlc->stf->txstreams == 1) ?
                                PHY_TXC1_MODE_SISO : band->band_stf_ss_mode;
        }
@@ -333,8 +332,6 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
                wlc->stf->ss_opmode = upd_stf_ss;
                brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
        }
-
-       return ret_code;
 }
 
 int brcms_c_stf_attach(struct brcms_c_info *wlc)
index ba94930..aa4ab53 100644 (file)
@@ -25,7 +25,7 @@ void brcms_c_stf_detach(struct brcms_c_info *wlc);
 void brcms_c_tempsense_upd(struct brcms_c_info *wlc);
 void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc,
                                     u16 *ss_algo_channel, u16 chanspec);
-int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band);
+void brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band);
 void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc);
 int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force);
 bool brcms_c_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val);