mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
staging: vt6656: Fix (most) sparse warnings regarding static functions/variables
This fixes sparse warnings for functions and variables, e.g.: * drivers/staging/vt6656/card.c:69:11: warning: symbol 'cwRXBCNTSFOff' was not declared. Should it be static? Some warnings were false positives, such as: * drivers/staging/vt6656/dpc.c:249:5: warning: symbol 'RXbBulkInProcessData' was not declared. Should it be static? Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1e01f94317
commit
3b1388518a
13 changed files with 46 additions and 45 deletions
|
@ -37,7 +37,7 @@
|
|||
* SBOX Table
|
||||
*/
|
||||
|
||||
u8 sbox_table[256] = {
|
||||
static u8 sbox_table[256] = {
|
||||
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
||||
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
|
||||
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
|
||||
|
@ -56,7 +56,7 @@ u8 sbox_table[256] = {
|
|||
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
|
||||
};
|
||||
|
||||
u8 dot2_table[256] = {
|
||||
static u8 dot2_table[256] = {
|
||||
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
|
||||
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
|
||||
0x40, 0x42, 0x44, 0x46, 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e,
|
||||
|
@ -75,7 +75,7 @@ u8 dot2_table[256] = {
|
|||
0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5
|
||||
};
|
||||
|
||||
u8 dot3_table[256] = {
|
||||
static u8 dot3_table[256] = {
|
||||
0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11,
|
||||
0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
|
||||
0x60, 0x63, 0x66, 0x65, 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71,
|
||||
|
@ -115,7 +115,7 @@ static void xor_32(u8 *a, u8 *b, u8 *out)
|
|||
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
|
||||
}
|
||||
|
||||
void AddRoundKey(u8 *key, int round)
|
||||
static void AddRoundKey(u8 *key, int round)
|
||||
{
|
||||
u8 sbox_key[4];
|
||||
u8 rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
|
||||
|
@ -133,7 +133,7 @@ void AddRoundKey(u8 *key, int round)
|
|||
xor_32(&key[12], &key[8], &key[12]);
|
||||
}
|
||||
|
||||
void SubBytes(u8 *in, u8 *out)
|
||||
static void SubBytes(u8 *in, u8 *out)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -141,7 +141,7 @@ void SubBytes(u8 *in, u8 *out)
|
|||
out[i] = sbox_table[in[i]];
|
||||
}
|
||||
|
||||
void ShiftRows(u8 *in, u8 *out)
|
||||
static void ShiftRows(u8 *in, u8 *out)
|
||||
{
|
||||
out[0] = in[0];
|
||||
out[1] = in[5];
|
||||
|
@ -161,7 +161,7 @@ void ShiftRows(u8 *in, u8 *out)
|
|||
out[15] = in[11];
|
||||
}
|
||||
|
||||
void MixColumns(u8 *in, u8 *out)
|
||||
static void MixColumns(u8 *in, u8 *out)
|
||||
{
|
||||
|
||||
out[0] = dot2_table[in[0]] ^ dot3_table[in[1]] ^ in[2] ^ in[3];
|
||||
|
@ -170,7 +170,7 @@ void MixColumns(u8 *in, u8 *out)
|
|||
out[3] = dot3_table[in[0]] ^ in[1] ^ in[2] ^ dot2_table[in[3]];
|
||||
}
|
||||
|
||||
void AESv128(u8 *key, u8 *data, u8 *ciphertext)
|
||||
static void AESv128(u8 *key, u8 *data, u8 *ciphertext)
|
||||
{
|
||||
int i;
|
||||
int round;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
static int msglevel =MSG_LEVEL_INFO;
|
||||
//static int msglevel =MSG_LEVEL_DEBUG;
|
||||
|
||||
u8 abyVT3184_AGC[] = {
|
||||
static u8 abyVT3184_AGC[] = {
|
||||
0x00, //0
|
||||
0x00, //1
|
||||
0x02, //2
|
||||
|
@ -115,7 +115,7 @@ u8 abyVT3184_AGC[] = {
|
|||
0x3E //3F
|
||||
};
|
||||
|
||||
u8 abyVT3184_AL2230[] = {
|
||||
static u8 abyVT3184_AL2230[] = {
|
||||
0x31,//00
|
||||
0x00,
|
||||
0x00,
|
||||
|
@ -375,7 +375,7 @@ u8 abyVT3184_AL2230[] = {
|
|||
};
|
||||
|
||||
//{{RobertYu:20060515, new BB setting for VT3226D0
|
||||
u8 abyVT3184_VT3226D0[] = {
|
||||
static u8 abyVT3184_VT3226D0[] = {
|
||||
0x31,//00
|
||||
0x00,
|
||||
0x00,
|
||||
|
@ -634,7 +634,7 @@ u8 abyVT3184_VT3226D0[] = {
|
|||
0x00,
|
||||
};
|
||||
|
||||
const u16 awcFrameTime[MAX_RATE] =
|
||||
static const u16 awcFrameTime[MAX_RATE] =
|
||||
{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};
|
||||
|
||||
/*
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
static int msglevel =MSG_LEVEL_INFO;
|
||||
//static int msglevel =MSG_LEVEL_DEBUG;
|
||||
|
||||
const u16 awHWRetry0[5][5] = {
|
||||
static const u16 awHWRetry0[5][5] = {
|
||||
{RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M},
|
||||
{RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M},
|
||||
{RATE_36M, RATE_36M, RATE_24M, RATE_18M, RATE_18M},
|
||||
{RATE_48M, RATE_48M, RATE_36M, RATE_24M, RATE_24M},
|
||||
{RATE_54M, RATE_54M, RATE_48M, RATE_36M, RATE_36M}
|
||||
};
|
||||
const u16 awHWRetry1[5][5] = {
|
||||
static const u16 awHWRetry1[5][5] = {
|
||||
{RATE_18M, RATE_18M, RATE_12M, RATE_6M, RATE_6M},
|
||||
{RATE_24M, RATE_24M, RATE_18M, RATE_6M, RATE_6M},
|
||||
{RATE_36M, RATE_36M, RATE_24M, RATE_12M, RATE_12M},
|
||||
|
|
|
@ -66,7 +66,7 @@ static int msglevel =MSG_LEVEL_INFO;
|
|||
//const u16 cwRXBCNTSFOff[MAX_RATE] =
|
||||
//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
|
||||
|
||||
const u16 cwRXBCNTSFOff[MAX_RATE] =
|
||||
static const u16 cwRXBCNTSFOff[MAX_RATE] =
|
||||
{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
|
||||
|
||||
/*
|
||||
|
@ -205,7 +205,7 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx)
|
|||
* Return Value: none
|
||||
*
|
||||
*/
|
||||
void
|
||||
static void
|
||||
CARDvCalculateOFDMRParameter (
|
||||
u16 wRate,
|
||||
u8 byBBType,
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
/* static int msglevel = MSG_LEVEL_DEBUG; */
|
||||
static int msglevel = MSG_LEVEL_INFO;
|
||||
const u8 acbyIERate[MAX_RATE] = {0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18,
|
||||
static const u8 acbyIERate[MAX_RATE] = {0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18,
|
||||
0x24, 0x30, 0x48, 0x60, 0x6C};
|
||||
|
||||
#define AUTORATE_TXOK_CNT 0x0400
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
//static int msglevel =MSG_LEVEL_DEBUG;
|
||||
static int msglevel =MSG_LEVEL_INFO;
|
||||
|
||||
const u8 acbyRxRate[MAX_RATE] =
|
||||
static const u8 acbyRxRate[MAX_RATE] =
|
||||
{2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
|
||||
|
||||
static u8 s_byGetRateIdx(u8 byRate);
|
||||
|
|
|
@ -419,7 +419,7 @@ static u8 vt3226_channel_table1[CB_MAX_CHANNEL_24G][3] = {
|
|||
///}}RobertYu
|
||||
|
||||
//{{RobertYu:20060502, TWIF 1.14, LO Current for 11b mode
|
||||
const u32 vt3226d0_lo_current_table[CB_MAX_CHANNEL_24G] = {
|
||||
static const u32 vt3226d0_lo_current_table[CB_MAX_CHANNEL_24G] = {
|
||||
0x0135C600+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW, // channel = 1, Tf = 2412MHz
|
||||
0x0135C600+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW, // channel = 2, Tf = 2417MHz
|
||||
0x0235C600+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW, // channel = 3, Tf = 2422MHz
|
||||
|
@ -597,7 +597,7 @@ static u8 vt3342_channel_table1[CB_MAX_CHANNEL][3] = {
|
|||
*
|
||||
-*/
|
||||
|
||||
const u32 al2230_power_table[AL2230_PWR_IDX_LEN] = {
|
||||
static const u32 al2230_power_table[AL2230_PWR_IDX_LEN] = {
|
||||
0x04040900+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW,
|
||||
0x04041900+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW,
|
||||
0x04042900+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW,
|
||||
|
|
|
@ -64,16 +64,16 @@
|
|||
|
||||
static int msglevel = MSG_LEVEL_INFO;
|
||||
|
||||
const u16 wTimeStampOff[2][MAX_RATE] = {
|
||||
static const u16 wTimeStampOff[2][MAX_RATE] = {
|
||||
{384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, // Long Preamble
|
||||
{384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, // Short Preamble
|
||||
};
|
||||
|
||||
const u16 wFB_Opt0[2][5] = {
|
||||
static const u16 wFB_Opt0[2][5] = {
|
||||
{RATE_12M, RATE_18M, RATE_24M, RATE_36M, RATE_48M}, // fallback_rate0
|
||||
{RATE_12M, RATE_12M, RATE_18M, RATE_24M, RATE_36M}, // fallback_rate1
|
||||
};
|
||||
const u16 wFB_Opt1[2][5] = {
|
||||
static const u16 wFB_Opt1[2][5] = {
|
||||
{RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, // fallback_rate0
|
||||
{RATE_6M , RATE_6M, RATE_12M, RATE_12M, RATE_18M}, // fallback_rate1
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
/* The 2nd table is the same as the 1st but with the upper and lower */
|
||||
/* bytes swapped. To allow an endian tolerant implementation, the byte */
|
||||
/* halves have been expressed independently here. */
|
||||
const u8 TKIP_Sbox_Lower[256] = {
|
||||
static const u8 TKIP_Sbox_Lower[256] = {
|
||||
0xA5,0x84,0x99,0x8D,0x0D,0xBD,0xB1,0x54,
|
||||
0x50,0x03,0xA9,0x7D,0x19,0x62,0xE6,0x9A,
|
||||
0x45,0x9D,0x40,0x87,0x15,0xEB,0xC9,0x0B,
|
||||
|
@ -74,7 +74,7 @@ const u8 TKIP_Sbox_Lower[256] = {
|
|||
0xC3,0xB0,0x77,0x11,0xCB,0xFC,0xD6,0x3A
|
||||
};
|
||||
|
||||
const u8 TKIP_Sbox_Upper[256] = {
|
||||
static const u8 TKIP_Sbox_Upper[256] = {
|
||||
0xC6,0xF8,0xEE,0xF6,0xFF,0xD6,0xDE,0x91,
|
||||
0x60,0x02,0xCE,0x56,0xE7,0xB5,0x4D,0xEC,
|
||||
0x8F,0x1F,0x89,0xFA,0xEF,0xB2,0x8E,0xFB,
|
||||
|
|
|
@ -224,7 +224,7 @@ static void s_vProbeChannel(struct vnt_private *pDevice)
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID,
|
||||
PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
|
||||
{
|
||||
|
@ -266,7 +266,8 @@ struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
|
|||
return pTxPacket;
|
||||
}
|
||||
|
||||
void vCommandTimerWait(struct vnt_private *pDevice, unsigned long MSecond)
|
||||
static void
|
||||
vCommandTimerWait(struct vnt_private *pDevice, unsigned long MSecond)
|
||||
{
|
||||
schedule_delayed_work(&pDevice->run_command_work,
|
||||
msecs_to_jiffies(MSecond));
|
||||
|
|
|
@ -2961,7 +2961,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice,
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod,
|
||||
u32 uCurrChannel, u16 wCurrATIMWinodw, u8 *pDstAddr,
|
||||
PWLAN_IE_SSID pCurrSSID, u8 *pCurrBSSID,
|
||||
|
@ -3081,7 +3081,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice,
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
|
||||
u16 wListenInterval,
|
||||
PWLAN_IE_SSID pCurrSSID,
|
||||
|
@ -3329,7 +3329,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
|
||||
u16 wListenInterval, PWLAN_IE_SSID pCurrSSID,
|
||||
PWLAN_IE_SUPP_RATES pCurrRates,
|
||||
|
@ -3576,7 +3576,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
|
||||
u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
|
||||
PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
|
||||
|
@ -3642,7 +3642,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice,
|
|||
*
|
||||
-*/
|
||||
|
||||
struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice,
|
||||
static struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice,
|
||||
struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
|
||||
u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
|
||||
PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
|
||||
|
|
|
@ -43,12 +43,12 @@
|
|||
|
||||
static int msglevel =MSG_LEVEL_INFO;
|
||||
|
||||
const u8 abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
|
||||
const u8 abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
|
||||
const u8 abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
|
||||
const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
|
||||
const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
|
||||
const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
|
||||
static const u8 abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
|
||||
static const u8 abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
|
||||
static const u8 abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
|
||||
static const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
|
||||
static const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
|
||||
static const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
|
||||
|
||||
/*+
|
||||
*
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
static int msglevel =MSG_LEVEL_INFO;
|
||||
//static int msglevel =MSG_LEVEL_DEBUG;
|
||||
|
||||
const u8 abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 };
|
||||
const u8 abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 };
|
||||
const u8 abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 };
|
||||
const u8 abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 };
|
||||
const u8 abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 };
|
||||
static const u8 abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 };
|
||||
static const u8 abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 };
|
||||
static const u8 abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 };
|
||||
static const u8 abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 };
|
||||
static const u8 abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 };
|
||||
|
||||
const u8 abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
|
||||
const u8 abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
|
||||
static const u8 abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
|
||||
static const u8 abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
|
||||
|
||||
/*+
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue