Commit 3b138851 authored by Valentina Manea's avatar Valentina Manea Committed by Greg Kroah-Hartman
Browse files

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: default avatarValentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e01f943
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -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;
+4 −4
Original line number Diff line number Diff line
@@ -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};

/*
+2 −2
Original line number Diff line number Diff line
@@ -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},
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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
Loading