From a4ef27ad02e0bfd165e81d6a4f3771ace42ebe41 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 18 Mar 2013 20:55:38 -0700 Subject: [PATCH] staging: vt6655: Remove unnecessary parentheses from returns Returns aren't functions, remove the parentheses to be more kernel style like. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/IEEE11h.c | 12 +++---- drivers/staging/vt6655/baseband.c | 4 +-- drivers/staging/vt6655/bssdb.c | 8 ++--- drivers/staging/vt6655/card.c | 58 +++++++++++++++--------------- drivers/staging/vt6655/channel.c | 22 ++++++------ drivers/staging/vt6655/key.c | 60 +++++++++++++++---------------- drivers/staging/vt6655/mac.c | 12 +++---- drivers/staging/vt6655/rf.c | 2 +- drivers/staging/vt6655/rxtx.c | 36 +++++++++---------- drivers/staging/vt6655/tether.c | 2 +- drivers/staging/vt6655/tkip.c | 2 +- drivers/staging/vt6655/vntwifi.c | 26 +++++++------- drivers/staging/vt6655/wcmd.c | 4 +-- drivers/staging/vt6655/wctl.c | 22 ++++++------ drivers/staging/vt6655/wpa2.c | 6 ++-- 15 files changed, 138 insertions(+), 138 deletions(-) diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c index 841761eda38c..802db8e6dd70 100644 --- a/drivers/staging/vt6655/IEEE11h.c +++ b/drivers/staging/vt6655/IEEE11h.c @@ -193,8 +193,8 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt, if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) return false; return true; -/* return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, - sizeof(WLAN_FRAME_TPCREP))); */ +/* return CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, + sizeof(WLAN_FRAME_TPCREP)); */ } @@ -278,8 +278,8 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket) pAction->byCategory); pAction->byCategory |= 0x80; - /*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, - uLength));*/ + /*return CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, + uLength);*/ return true; } return true; @@ -322,8 +322,8 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle) if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) return false; return true; -/* return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, - uLength)); */ +/* return CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, + uLength); */ } diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 3b7cc366ec79..8df3973dd262 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -1805,7 +1805,7 @@ BBuGetFrameTime( uFrameTime++; } - return (uPreamble + uFrameTime); + return uPreamble + uFrameTime; } else { uFrameTime = (cbFrameLength * 8 + 22) / uRate; //???????? uTmp = ((uFrameTime * uRate) - 22) / 8; @@ -1816,7 +1816,7 @@ BBuGetFrameTime( if (byPktType != PK_TYPE_11A) { uFrameTime += 6; //?????? } - return (20 + uFrameTime); //?????? + return 20 + uFrameTime; //?????? } } diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 09ed7d4db9f5..abb238e9aeea 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -172,7 +172,7 @@ BSSpSearchBSSList( ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ) { pCurrBSS->bSelected = true; - return(pCurrBSS); + return pCurrBSS; } } } else { @@ -181,7 +181,7 @@ BSSpSearchBSSList( ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ) { pCurrBSS->bSelected = true; - return(pCurrBSS); + return pCurrBSS; } } } @@ -260,10 +260,10 @@ BSSpSearchBSSList( memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); }*/ - return(pSelect); + return pSelect; } } - return(NULL); + return NULL; } diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 8903708b8d7e..9541b68de99d 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -371,7 +371,7 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v return TXbTD1Send(pDevice, pPacket, uLength); } - return (true); + return true; } */ @@ -392,9 +392,9 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; if (pDevice->byPreambleType == 0) { - return(false); + return false; } - return(true); + return true; } /* @@ -412,7 +412,7 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) bool CARDbIsShorSlotTime(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; - return(pDevice->bShortSlotTime); + return pDevice->bShortSlotTime; } @@ -596,7 +596,7 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates); pDevice->eCurrentPHYType = ePHYType; // set for NDIS OID_802_11SUPPORTED_RATES - return (true); + return true; } /* @@ -632,7 +632,7 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTim VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset)); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN); } - return(true); + return true; } @@ -686,7 +686,7 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval) VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - return(true); + return true; } @@ -725,7 +725,7 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) if (pDevice->bIsBeaconBufReadySet == true) { if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) { pDevice->cbBeaconBufReadySetCnt++; - return(false); + return false; } } pDevice->bIsBeaconBufReadySet = false; @@ -735,17 +735,17 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) // wait all TD0 complete if (pDevice->bStopTx0Pkt == true) { if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) { - return(false); + return false; } } // wait all Data TD complete if (pDevice->bStopDataPkt == true) { if (pDevice->iTDUsed[TYPE_AC0DMA] != 0) { - return(false); + return false; } } - return(true); + return true; } @@ -785,7 +785,7 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); } - return(true); + return true; } @@ -835,7 +835,7 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e } // Adopt BSS state in Adapter Device Object pDevice->eOPMode = eOPMode; - return(true); + return true; } @@ -881,7 +881,7 @@ bool CARDbSetTxDataRate( PSDevice pDevice = (PSDevice) pDeviceHandler; pDevice->wCurrentRate = wDataRate; - return(true); + return true; } /*+ @@ -1034,7 +1034,7 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID) PSDevice pDevice = (PSDevice) pDeviceHandler; KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset); - return (true); + return true; } @@ -1112,7 +1112,7 @@ CARDpGetCurrentAddress( { PSDevice pDevice = (PSDevice) pDeviceHandler; - return (pDevice->abyCurrentNetAddr); + return pDevice->abyCurrentNetAddr; } /* @@ -1145,7 +1145,7 @@ CARDbStartMeasure( if ((pEID == NULL) || (uNumOfMeasureEIDs == 0)) { - return (true); + return true; } CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF); if (pDevice->bMeasureInProgress == true) { @@ -1238,7 +1238,7 @@ CARDbStartMeasure( pDevice->abyRPIs ); } - return (true); + return true; } @@ -1273,7 +1273,7 @@ CARDbChannelSwitch( MACvSelectPage1(pDevice->PortOffset); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE); MACvSelectPage0(pDevice->PortOffset); - return(bResult); + return bResult; } pDevice->byChannelSwitchCount = byCount; pDevice->byNewChannel = byNewChannel; @@ -1281,7 +1281,7 @@ CARDbChannelSwitch( if (byMode == 1) { bResult = CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL); } - return (bResult); + return bResult; } @@ -1337,7 +1337,7 @@ CARDbSetQuiet( } else { // we can not handle Quiet EID more } - return (true); + return true; } @@ -1402,7 +1402,7 @@ CARDbStartQuiet( dwGap = pDevice->dwCurrentQuietEndTime - pDevice->sQuiet[uCurrentQuietIndex].dwStartTime; if (dwGap >= pDevice->sQuiet[uCurrentQuietIndex].wDuration) { // return false to indicate next quiet expired, should call this function again - return (false); + return false; } dwDuration = pDevice->sQuiet[uCurrentQuietIndex].wDuration - dwGap; dwGap = 0; @@ -1439,7 +1439,7 @@ CARDbStartQuiet( pDevice->dwCurrentQuietEndTime -= 0x80000000; } } - return (true); + return true; } /* @@ -1533,7 +1533,7 @@ CARDbyGetTransmitPower( { PSDevice pDevice = (PSDevice) pDeviceHandler; - return (pDevice->byCurPwrdBm); + return pDevice->byCurPwrdBm; } //xxx @@ -1944,7 +1944,7 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx) //Determines the highest basic rate. CARDvUpdateBasicTopRate((void *)pDevice); - return(true); + return true; } bool CARDbIsOFDMinBasicRate(void *pDeviceHandler) @@ -2060,7 +2060,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2) } else { HIDWORD(qwTSFOffset) = HIDWORD(qwTSF1) - HIDWORD(qwTSF2); }; - return (qwTSFOffset); + return qwTSFOffset; } @@ -2089,11 +2089,11 @@ bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF) break; } if (ww == W_MAX_TIMEOUT) - return(false); + return false; VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF)); VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF)); - return(true); + return true; } @@ -2137,7 +2137,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval) LODWORD(qwTSF) = uLowNextTBTT + uLowRemain; - return (qwTSF); + return qwTSF; } diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index ccc1051d8dbc..ca852ddfeb06 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -390,7 +390,7 @@ bool is_channel_valid(unsigned int ChannelIndex) bValid = sChannelTbl[ChannelIndex].bValid; exit: - return (bValid); + return bValid; } @@ -409,11 +409,11 @@ exit: bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable) { if (uCountryCodeIdx >= CCODE_MAX) - return (false); + return false; memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); - return (true); + return true; } void init_channel_table(void *pDeviceHandler) @@ -498,11 +498,11 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN unsigned int ii; if ((ePhyType == PHY_TYPE_11B) || (ePhyType == PHY_TYPE_11G)) - return (byChannelNumber); + return byChannelNumber; for (ii = (CB_MAX_CHANNEL_24G + 1); ii <= CB_MAX_CHANNEL;) { if (sChannelTbl[ii].byChannelNumber == byChannelNumber) - return ((unsigned char) ii); + return (unsigned char) ii; ii++; } return 0; @@ -511,7 +511,7 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex) { //PSDevice pDevice = (PSDevice) pDeviceHandler; - return(sChannelTbl[byChannelIndex].byChannelNumber); + return sChannelTbl[byChannelIndex].byChannelNumber; } /** @@ -534,7 +534,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) } if (sChannelTbl[uConnectionChannel].bValid == false) { - return (false); + return false; } if ((uConnectionChannel > CB_MAX_CHANNEL_24G) && @@ -583,7 +583,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh); } - return(bResult); + return bResult; } /** @@ -712,7 +712,7 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) byLen += 2; } pIE->len += (byLen - 2); - return (byLen); + return byLen; } void set_country_IE(void *pDeviceHandler, void *pIE) @@ -779,7 +779,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) byOptionChannel = (unsigned char) ii; } if (sChannelTbl[ii].byMAP == 0) { - return ((unsigned char) ii); + return (unsigned char) ii; } else if (!(sChannelTbl[ii].byMAP & 0x08)) { byOptionChannel = (unsigned char) ii; } @@ -821,5 +821,5 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) } } } - return (byOptionChannel); + return byOptionChannel; } diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index a79445137e9f..d2b5d625293b 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -149,23 +149,23 @@ bool KeybGetKey( if (dwKeyIndex == 0xFFFFFFFF) { if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) { *pKey = &(pTable->KeyTable[i].PairwiseKey); - return (true); + return true; } else { - return (false); + return false; } } else if (dwKeyIndex < MAX_GROUP_KEY) { if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) { *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]); - return (true); + return true; } else { - return (false); + return false; } } else { - return (false); + return false; } } } - return (false); + return false; } @@ -224,7 +224,7 @@ bool KeybSetKey( } else { // Group key if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) - return (false); + return false; pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]); if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key @@ -273,7 +273,7 @@ bool KeybSetKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); - return (true); + return true; } } if (j < (MAX_KEY_TABLE-1)) { @@ -288,7 +288,7 @@ bool KeybSetKey( } else { // Group key if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) - return (false); + return false; pKey = &(pTable->KeyTable[j].GroupKey[dwKeyIndex & 0x000000FF]); if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key @@ -337,9 +337,9 @@ bool KeybSetKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); - return (true); + return true; } - return (false); + return false; } @@ -395,7 +395,7 @@ bool KeybRemoveKey( if ((dwKeyIndex & PAIRWISE_KEY) != 0) { pTable->KeyTable[i].PairwiseKey.bKeyValid = false; s_vCheckKeyTableValid(pTable, dwIoBase); - return (true); + return true; } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false; if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) { @@ -403,13 +403,13 @@ bool KeybRemoveKey( pTable->KeyTable[i].dwGTKeyIndex = 0; } s_vCheckKeyTableValid(pTable, dwIoBase); - return (true); + return true; } else { - return (false); + return false; } } } - return (false); + return false; } @@ -443,10 +443,10 @@ bool KeybRemoveAllKey( } pTable->KeyTable[i].dwGTKeyIndex = 0; s_vCheckKeyTableValid(pTable, dwIoBase); - return (true); + return true; } } - return (false); + return false; } /* @@ -535,10 +535,10 @@ bool KeybGetTransmitKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); - return (true); + return true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PairwiseKey.bKeyValid == false\n"); - return (false); + return false; } } // End of Type == PAIRWISE else { @@ -557,10 +557,10 @@ bool KeybGetTransmitKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); - return (true); + return true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GroupKey.bKeyValid == false\n"); - return (false); + return false; } } // End of Type = GROUP } // BSSID match @@ -570,7 +570,7 @@ bool KeybGetTransmitKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", *(pbyBSSID+ii)); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); - return (false); + return false; } @@ -598,10 +598,10 @@ bool KeybCheckPairewiseKey( if ((pTable->KeyTable[i].bInUse == true) && (pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) { *pKey = &(pTable->KeyTable[i].PairwiseKey); - return (true); + return true; } } - return (false); + return false; } /* @@ -639,9 +639,9 @@ bool KeybSetDefaultKey( if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key - return (false); + return false; } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { - return (false); + return false; } if (uKeyLength > MAX_KEY_LEN) @@ -710,7 +710,7 @@ bool KeybSetDefaultKey( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); - return (true); + return true; } @@ -750,9 +750,9 @@ bool KeybSetAllGroupKey( if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key - return (false); + return false; } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { - return (false); + return false; } for (i = 0; i < MAX_KEY_TABLE - 1; i++) { @@ -810,5 +810,5 @@ bool KeybSetAllGroupKey( } // (pTable->KeyTable[i].bInUse == true) } - return (true); + return true; } diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 33e89f0319d6..7dd7cc3496d1 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -858,7 +858,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x10); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x10)\n"); - return(false); + return false; } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_RXDMACTL1, &dwData); @@ -868,7 +868,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x11); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x11)\n"); - return(false); + return false; } // try to safe shutdown RX @@ -882,7 +882,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x12); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x12)\n"); - return(false); + return false; } return true; } @@ -921,7 +921,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x20); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x20)\n"); - return(false); + return false; } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_AC0DMACTL, &dwData); @@ -931,7 +931,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x21); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x21)\n"); - return(false); + return false; } // try to safe shutdown TX @@ -946,7 +946,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x24); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x24)\n"); - return(false); + return false; } return true; } diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 015fa79d19fb..2eab18bea685 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -1059,7 +1059,7 @@ bool RFbRawSetPower( unsigned long dwMax7230Pwr = 0; if (byPwr >= pDevice->byMaxPwrLevel) { - return (false); + return false; } switch (pDevice->byRFType) { diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 5152ba3b6910..04e5ff87a01d 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -385,7 +385,7 @@ s_uGetTxRsvTime( } if (bNeedAck) { - return (uDataTime + pDevice->uSIFS + uAckTime); + return uDataTime + pDevice->uSIFS + uAckTime; } else { return uDataTime; } @@ -462,7 +462,7 @@ s_uGetDataDuration( if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); - return (pDevice->uSIFS + uAckTime); + return pDevice->uSIFS + uAckTime; } else { return 0; } @@ -474,9 +474,9 @@ s_uGetDataDuration( } if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); - return (pDevice->uSIFS + uAckTime + uNextPktTime); + return pDevice->uSIFS + uAckTime + uNextPktTime; } else { - return (pDevice->uSIFS + uNextPktTime); + return pDevice->uSIFS + uNextPktTime; } } break; @@ -485,7 +485,7 @@ s_uGetDataDuration( if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime); + return pDevice->uSIFS + uAckTime; } else { return 0; } @@ -497,9 +497,9 @@ s_uGetDataDuration( } if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime + uNextPktTime); + return pDevice->uSIFS + uAckTime + uNextPktTime; } else { - return (pDevice->uSIFS + uNextPktTime); + return pDevice->uSIFS + uNextPktTime; } } break; @@ -508,7 +508,7 @@ s_uGetDataDuration( if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime); + return pDevice->uSIFS + uAckTime; } else { return 0; } @@ -539,9 +539,9 @@ s_uGetDataDuration( if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime + uNextPktTime); + return pDevice->uSIFS + uAckTime + uNextPktTime; } else { - return (pDevice->uSIFS + uNextPktTime); + return pDevice->uSIFS + uNextPktTime; } } break; @@ -550,7 +550,7 @@ s_uGetDataDuration( if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime); + return pDevice->uSIFS + uAckTime; } else { return 0; } @@ -581,9 +581,9 @@ s_uGetDataDuration( } if (bNeedAck) { uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return (pDevice->uSIFS + uAckTime + uNextPktTime); + return pDevice->uSIFS + uAckTime + uNextPktTime; } else { - return (pDevice->uSIFS + uNextPktTime); + return pDevice->uSIFS + uNextPktTime; } } break; @@ -743,7 +743,7 @@ s_uFillDataHead( pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]); - return (pBuf->wDuration_a); + return pBuf->wDuration_a; } else { // Auto Fallback PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead; @@ -769,7 +769,7 @@ s_uFillDataHead( pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]); - return (pBuf->wDuration_a); + return pBuf->wDuration_a; } //if (byFBOption == AUTO_FB_NONE) } else if (byPktType == PK_TYPE_11A) { if ((byFBOption != AUTO_FB_NONE)) { @@ -789,7 +789,7 @@ s_uFillDataHead( pBuf->wDuration_f1 = cpu_to_le16((unsigned short)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); - return (pBuf->wDuration); + return pBuf->wDuration; } else { PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length @@ -805,7 +805,7 @@ s_uFillDataHead( byFBOption)); pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); - return (pBuf->wDuration); + return pBuf->wDuration; } } else { PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; @@ -820,7 +820,7 @@ s_uFillDataHead( cbLastFragmentSize, uMACfragNum, byFBOption)); pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); - return (pBuf->wDuration); + return pBuf->wDuration; } return 0; } diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c index 26dc89aa1a7b..bb47d3b4318f 100644 --- a/drivers/staging/vt6655/tether.c +++ b/drivers/staging/vt6655/tether.c @@ -79,7 +79,7 @@ unsigned char ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr) } // adjust 6-bits to the right most - return (byHash >> 2); + return byHash >> 2; } diff --git a/drivers/staging/vt6655/tkip.c b/drivers/staging/vt6655/tkip.c index ccdcdf5731c9..83f9a410144d 100644 --- a/drivers/staging/vt6655/tkip.c +++ b/drivers/staging/vt6655/tkip.c @@ -151,7 +151,7 @@ unsigned int tkip_sbox(unsigned int index) left = TKIP_Sbox_Lower[index_low] + (TKIP_Sbox_Upper[index_low] * 256); right = TKIP_Sbox_Upper[index_high] + (TKIP_Sbox_Lower[index_high] * 256); - return (left ^ right); + return left ^ right; }; diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index 23a2a2253075..64d43efe9f14 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -131,7 +131,7 @@ VNTWIFIpGetCurrentSSID( ) { PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; - return((PWLAN_IE_SSID) pMgmt->abyCurrSSID); + return (PWLAN_IE_SSID) pMgmt->abyCurrSSID; } /*+ @@ -155,7 +155,7 @@ VNTWIFIpGetCurrentChannel( { PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; if (pMgmtHandle != NULL) { - return (pMgmt->uCurrChannel); + return pMgmt->uCurrChannel; } return 0; } @@ -180,7 +180,7 @@ VNTWIFIwGetAssocID( ) { PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; - return(pMgmt->wCurrAID); + return pMgmt->wCurrAID; } @@ -369,11 +369,11 @@ VNTWIFIbConfigPhyMode( if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL) == true) { pMgmt->eCurrentPHYMode = ePhyType; } else { - return(false); + return false; } } pMgmt->eConfigPHYMode = ePhyType; - return(true); + return true; } @@ -602,9 +602,9 @@ VNTWIFIbyGetKeyCypher( PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; if (bGroupKey == true) { - return (pMgmt->byCSSGK); + return pMgmt->byCSSGK; } else { - return (pMgmt->byCSSPK); + return pMgmt->byCSSPK; } } @@ -663,11 +663,11 @@ VNTWIFIbSetPMKIDCache( PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; if (ulCount > MAX_PMKID_CACHE) { - return (false); + return false; } pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); - return (true); + return true; } @@ -682,13 +682,13 @@ VNTWIFIwGetMaxSupportRate( for (wRate = RATE_54M; wRate > RATE_1M; wRate--) { if (pMgmt->sNodeDBTable[0].wSuppRate & (1<eCurrentPHYMode == PHY_TYPE_11A) { - return (RATE_6M); + return RATE_6M; } else { - return (RATE_1M); + return RATE_1M; } } @@ -760,7 +760,7 @@ VNTWIFIbMeasureReport( IEEE11hbMSRRepTx(pMgmt); } //spin_unlock_irq(&pDevice->lock); - return (true); + return true; } diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index 9a16647be68a..9f51766bb8a3 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -946,7 +946,7 @@ bool bScheduleCommand( if (pDevice->cbFreeCmdQueue == 0) { - return (false); + return false; } pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand; pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true; @@ -998,7 +998,7 @@ bool bScheduleCommand( s_bCommandComplete(pDevice); } else { } - return (true); + return true; } diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c index 81b43dcc6e00..0bf5e9226d52 100644 --- a/drivers/staging/vt6655/wctl.c +++ b/drivers/staging/vt6655/wctl.c @@ -117,10 +117,10 @@ unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader) (!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) ) { // - return(ii); + return ii; } } - return(pDevice->cbDFCB); + return pDevice->cbDFCB; } @@ -143,7 +143,7 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader) unsigned int ii; if (pDevice->cbFreeDFCB == 0) - return(pDevice->cbDFCB); + return pDevice->cbDFCB; for (ii = 0; ii < pDevice->cbDFCB; ii++) { if (pDevice->sRxDFCB[ii].bInUse == false) { pDevice->cbFreeDFCB--; @@ -152,10 +152,10 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader) pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4); pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F); memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN); - return(ii); + return ii; } } - return(pDevice->cbDFCB); + return pDevice->cbDFCB; } @@ -199,7 +199,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i } else { pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader); if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) { - return(false); + return false; } } // reserve 4 byte to match MAC RX Buffer @@ -209,7 +209,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); - return(false); + return false; } else { pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader); if (pDevice->uCurrentDFCBIdx != pDevice->cbDFCB) { @@ -226,19 +226,19 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i // seq error or frag # error flush DFCB pDevice->cbFreeDFCB++; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false; - return(false); + return false; } } else { - return(false); + return false; } if (IS_LAST_FRAGMENT_PKT(pMACHeader)) { //enq defragcontrolblock pDevice->cbFreeDFCB++; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false; //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); - return(true); + return true; } - return(false); + return false; } } diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index 0b33feabcd16..98a2160c7548 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -273,7 +273,7 @@ WPA2uSetIEs( unsigned short *pwPMKID = NULL; if (pRSNIEs == NULL) { - return(0); + return 0; } if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && @@ -358,7 +358,7 @@ WPA2uSetIEs( pbyBuffer = &pRSNIEs->abyRSN[18]; } } - return(pRSNIEs->len + WLAN_IEHDR_LEN); + return pRSNIEs->len + WLAN_IEHDR_LEN; } - return(0); + return 0; } -- 2.34.1