[1/3] brcmsmac: Remove unneeded variable and make function to be void
diff mbox series

Message ID 1568306492-42998-2-git-send-email-zhongjiang@huawei.com
State Rejected
Delegated to: Kalle Valo
Headers show
Series
  • wireless: Remove unneeded variable
Related show

Commit Message

zhong jiang Sept. 12, 2019, 4:41 p.m. UTC
brcms_c_set_mac  do not need return value to cope with different
cases. And change functon return type to void.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Kalle Valo Sept. 13, 2019, 1:37 p.m. UTC | #1
zhong jiang <zhongjiang@huawei.com> wrote:

> brcms_c_set_mac  do not need return value to cope with different
> cases. And change functon return type to void.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

I just don't see the benefit from changing the function to return void.
And if we ever add error handling to the function we need to change it
back to return int again, which is extra work.

Patch set to Rejected.

Patch
diff mbox series

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
index 080e829..ddc4d47 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
@@ -3776,17 +3776,14 @@  static void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc)
  * Write this BSS config's MAC address to core.
  * Updates RXE match engine.
  */
-static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
+static void brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
 {
-	int err = 0;
 	struct brcms_c_info *wlc = bsscfg->wlc;
 
 	/* enter the MAC addr into the RXE match registers */
 	brcms_c_set_addrmatch(wlc, RCM_MAC_OFFSET, wlc->pub->cur_etheraddr);
 
 	brcms_c_ampdu_macaddr_upd(wlc);
-
-	return err;
 }
 
 /* Write the BSS config's BSSID address to core (set_bssid in d11procs.tcl).