From 7354a17509376fc1e0a7b82518426d4249e933ea Mon Sep 17 00:00:00 2001 From: Petar Dimitrijevic Date: Sun, 20 Jul 2014 09:34:55 +0200 Subject: [PATCH] staging: vt6655: Fixed checkpatch errors This patch fixes the errors report by the checkpatch script. Most of them are use of C99 comments. The checkpatch doesn't report any errors after the clean up. However, please not that there are still ton of warnings left. Signed-off-by: Petar Dimitrijevic Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/datarate.c | 35 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c index f8420d65cd94..83ad74cf6841 100644 --- a/drivers/staging/vt6655/datarate.c +++ b/drivers/staging/vt6655/datarate.c @@ -47,11 +47,12 @@ /*--------------------- Static Classes ----------------------------*/ -extern unsigned short TxRate_iwconfig; //2008-5-8 by chester +extern unsigned short TxRate_iwconfig; /* 2008-5-8 by chester */ /*--------------------- Static Variables --------------------------*/ static int msglevel = MSG_LEVEL_INFO; -static const unsigned char acbyIERate[MAX_RATE] = -{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; +static const unsigned char acbyIERate[MAX_RATE] = { +0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C +}; #define AUTORATE_TXOK_CNT 0x0400 #define AUTORATE_TXFAIL_CNT 0x0064 @@ -70,7 +71,7 @@ s_vResetCounter( { unsigned char ii; - // clear statistic counter for auto_rate + /* clear statistic counter for auto_rate */ for (ii = 0; ii <= MAX_RATE; ii++) { psNodeDBTable->uTxOk[ii] = 0; psNodeDBTable->uTxFail[ii] = 0; @@ -102,8 +103,8 @@ DATARATEbyGetRateIdx( { unsigned char ii; - //Erase basicRate flag. - byRate = byRate & 0x7F;//0111 1111 + /* Erase basicRate flag. */ + byRate = byRate & 0x7F;/* 0111 1111 */ for (ii = 0; ii < MAX_RATE; ii++) { if (acbyIERate[ii] == byRate) @@ -151,13 +152,14 @@ wGetRateIdx( { unsigned short ii; - //Erase basicRate flag. - byRate = byRate & 0x7F;//0111 1111 + /* Erase basicRate flag. */ + byRate = byRate & 0x7F;/* 0111 1111 */ for (ii = 0; ii < MAX_RATE; ii++) { if (acbyIERate[ii] == byRate) return ii; } + return 0; } @@ -218,7 +220,7 @@ RATEvParseMaxRate( for (ii = 0; ii < uRateLen; ii++) { byRate = (unsigned char)(pItemRates->abyRates[ii]); if (WLAN_MGMT_IS_BASICRATE(byRate) && bUpdateBasicRate) { - // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate + /* Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate */ CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); } @@ -238,9 +240,9 @@ RATEvParseMaxRate( for (ii = 0; ii < uExtRateLen; ii++) { byRate = (unsigned char)(pItemExtRates->abyRates[ii]); - // select highest basic rate + /* select highest basic rate */ if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) { - // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate + /* Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate */ CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); } @@ -302,10 +304,9 @@ RATEvTxRateFallBack( unsigned short wIdxUpRate = 0; unsigned long dwTxDiff = 0; - if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) { - // Don't do Fallback when scanning Channel + if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) + /* Don't do Fallback when scanning Channel */ return; - } psNodeDBTable->uTimeCount++; @@ -357,11 +358,13 @@ RATEvTxRateFallBack( (psNodeDBTable->uTxFail[MAX_RATE] * 4)) { psNodeDBTable->wTxDataRate = wIdxUpRate; } - } else { // adhoc, if uTxOk =0 & uTxFail = 0 + } else { + /* adhoc, if uTxOk =0 & uTxFail = 0 */ if (psNodeDBTable->uTxFail[MAX_RATE] == 0) psNodeDBTable->wTxDataRate = wIdxUpRate; } -//2008-5-8 by chester + + /* 2008-5-8 by chester */ TxRate_iwconfig = psNodeDBTable->wTxDataRate; s_vResetCounter(psNodeDBTable); -- 2.39.5