[PATCH 2/2] Staging: brcm80211: brace coding style issues fix

Guilherme Salazar salazartux at gmail.com
Mon May 9 23:54:09 UTC 2011


This patch fixes brace coding issues. There are
also lots of line over 80 characters issues, but
this patch doesn't fixes it up.

Signed-off-by: Guilherme Salazar <salazartux at gmail.com>
---
 drivers/staging/brcm80211/brcmsmac/wlc_bmac.c |   51 ++++++++++--------------
 1 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
index 4b6e181..b25cf68 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
@@ -372,15 +372,13 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
 	}
 
 	/* phy tx error */
-	if (macintstatus & MI_PHYTXERR) {
+	if (macintstatus & MI_PHYTXERR)
 		wlc->pub->_cnt->txphyerr++;
-	}
 
 	/* received data or control frame, MI_DMAINT is indication of RX_FIFO interrupt */
 	if (macintstatus & MI_DMAINT) {
-		if (wlc_bmac_recv(wlc_hw, RX_FIFO, bounded)) {
+		if (wlc_bmac_recv(wlc_hw, RX_FIFO, bounded))
 			wlc->macintstatus |= MI_DMAINT;
-		}
 	}
 
 	/* TX FIFO suspend/flush completion */
@@ -391,9 +389,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
 	}
 
 	/* noise sample collected */
-	if (macintstatus & MI_BG_NOISE) {
+	if (macintstatus & MI_BG_NOISE)
 		wlc_phy_noise_sample_intr(wlc_hw->band->pi);
-	}
 
 	if (macintstatus & MI_GP0) {
 		WL_ERROR("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n",
@@ -410,9 +407,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
 	}
 
 	/* gptimer timeout */
-	if (macintstatus & MI_TO) {
+	if (macintstatus & MI_TO)
 		W_REG(&regs->gptimer, 0);
-	}
 
 	if (macintstatus & MI_RFDISABLE) {
 		WL_TRACE("wl%d: BMAC Detected a change on the RF Disable Input\n", wlc_hw->unit);
@@ -1462,9 +1458,9 @@ static void wlc_write_mhf(struct wlc_hw_info *wlc_hw, u16 *mhfs)
 
 	ASSERT(ARRAY_SIZE(addr) == MHFMAX);
 
-	for (idx = 0; idx < MHFMAX; idx++) {
+	for (idx = 0; idx < MHFMAX; idx++)
 		wlc_bmac_write_shm(wlc_hw, addr[idx], mhfs[idx]);
-	}
+
 }
 
 /* set the maccontrol register to desired reset state and
@@ -1783,13 +1779,12 @@ static void WLBANDINITFN(wlc_bmac_upd_synthpu) (struct wlc_hw_info *wlc_hw)
 	struct wlc_info *wlc = wlc_hw->wlc;
 	/* update SYNTHPU_DLY */
 
-	if (WLCISLCNPHY(wlc->band)) {
+	if (WLCISLCNPHY(wlc->band))
 		v = SYNTHPU_DLY_LPPHY_US;
-	} else if (WLCISNPHY(wlc->band) && (NREV_GE(wlc->band->phyrev, 3))) {
+	else if (WLCISNPHY(wlc->band) && (NREV_GE(wlc->band->phyrev, 3)))
 		v = SYNTHPU_DLY_NPHY_US;
-	} else {
+	else
 		v = SYNTHPU_DLY_BPHY_US;
-	}
 
 	wlc_bmac_write_shm(wlc_hw, M_SYNTHPU_DLY, v);
 }
@@ -2364,9 +2359,8 @@ static void wlc_coreinit(struct wlc_info *wlc)
 	}
 
 	/* For old ucode, txfifo sizes needs to be modified(increased) */
-	if (fifosz_fixup == true) {
+	if (fifosz_fixup == true)
 		wlc_corerev_fifofixup(wlc_hw);
-	}
 
 	/* check txfifo allocations match between ucode and driver */
 	buf[TX_AC_BE_FIFO] = wlc_bmac_read_shm(wlc_hw, M_FIFOSIZE0);
@@ -2836,9 +2830,9 @@ static void wlc_bmac_mute(struct wlc_hw_info *wlc_hw, bool on, mbool flags)
 				       null_ether_addr);
 	} else {
 		/* resume tx fifos */
-		if (!wlc_hw->wlc->tx_suspended) {
+		if (!wlc_hw->wlc->tx_suspended)
 			wlc_bmac_tx_fifo_resume(wlc_hw, TX_DATA_FIFO);
-		}
+
 		wlc_bmac_tx_fifo_resume(wlc_hw, TX_CTL_FIFO);
 		wlc_bmac_tx_fifo_resume(wlc_hw, TX_AC_BK_FIFO);
 		wlc_bmac_tx_fifo_resume(wlc_hw, TX_AC_VI_FIFO);
@@ -3549,9 +3543,9 @@ void wlc_bmac_set_shm(struct wlc_hw_info *wlc_hw, uint offset, u16 v, int len)
 	if (len <= 0)
 		return;
 
-	for (i = 0; i < len; i += 2) {
+	for (i = 0; i < len; i += 2)
 		wlc_bmac_write_objmem(wlc_hw, offset + i, v, OBJADDR_SHM_SEL);
-	}
+
 }
 
 static u16
@@ -3566,11 +3560,10 @@ wlc_bmac_read_objmem(struct wlc_hw_info *wlc_hw, uint offset, u32 sel)
 
 	W_REG(&regs->objaddr, sel | (offset >> 2));
 	(void)R_REG(&regs->objaddr);
-	if (offset & 2) {
+	if (offset & 2)
 		v = R_REG(objdata_hi);
-	} else {
+	else
 		v = R_REG(objdata_lo);
-	}
 
 	return v;
 }
@@ -3586,11 +3579,11 @@ wlc_bmac_write_objmem(struct wlc_hw_info *wlc_hw, uint offset, u16 v, u32 sel)
 
 	W_REG(&regs->objaddr, sel | (offset >> 2));
 	(void)R_REG(&regs->objaddr);
-	if (offset & 2) {
+	if (offset & 2)
 		W_REG(objdata_hi, v);
-	} else {
+	else
 		W_REG(objdata_lo, v);
-	}
+
 }
 
 /* Copy a buffer to shared memory of specified type .
@@ -3689,9 +3682,8 @@ void wlc_bmac_pllreq(struct wlc_hw_info *wlc_hw, bool set, mbool req_bit)
 		mboolset(wlc_hw->pllreq, req_bit);
 
 		if (mboolisset(wlc_hw->pllreq, WLC_PLLREQ_FLIP)) {
-			if (!wlc_hw->sbclk) {
+			if (!wlc_hw->sbclk)
 				wlc_bmac_xtal(wlc_hw, ON);
-			}
 		}
 	} else {
 		if (!mboolisset(wlc_hw->pllreq, req_bit))
@@ -3700,9 +3692,8 @@ void wlc_bmac_pllreq(struct wlc_hw_info *wlc_hw, bool set, mbool req_bit)
 		mboolclr(wlc_hw->pllreq, req_bit);
 
 		if (mboolisset(wlc_hw->pllreq, WLC_PLLREQ_FLIP)) {
-			if (wlc_hw->sbclk) {
+			if (wlc_hw->sbclk)
 				wlc_bmac_xtal(wlc_hw, OFF);
-			}
 		}
 	}
 
-- 
1.7.2.5




More information about the devel mailing list