[OPW,kernel] Staging: vt6656: Fix Sparse Warning for Static Declarations in aes_ccmp.c
diff mbox

Message ID 1382646257-16491-1-git-send-email-ebru.akagunduz@gmail.com
State Changes Requested
Headers show

Commit Message

Ebru Akagündüz Oct. 24, 2013, 8:24 p.m. UTC
This patch fixes the Sparse Warning "symbol was
not declared. Should it be static?" in aes_ccmp.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/staging/vt6656/aes_ccmp.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Rusty Russell Oct. 25, 2013, 1:05 a.m. UTC | #1
Ebru Akagunduz <ebru.akagunduz@gmail.com> writes:
> This patch fixes the Sparse Warning "symbol was
> not declared. Should it be static?" in aes_ccmp.c
>
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>

(More ambitious would be to replace this custom AES implementation with
 the generic kernel one, but that's best done with someone who can test it)

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/vt6656/aes_ccmp.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c
> index 28a4c4c..daf33fa 100644
> --- a/drivers/staging/vt6656/aes_ccmp.c
> +++ b/drivers/staging/vt6656/aes_ccmp.c
> @@ -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;
> @@ -218,7 +218,7 @@ void AESv128(u8 *key, u8 *data, u8 *ciphertext)
>   *
>   */
>  
> -bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize)
> +static bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize)
>  {
>  	u8            abyNonce[13];
>  	u8            MIC_IV[16];
> -- 
> 1.8.1.2
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Ebru Akagündüz Oct. 27, 2013, 8:46 p.m. UTC | #2
Should i do something for this patch?

Thanks.
Rusty Russell Oct. 28, 2013, 3:16 a.m. UTC | #3
Ebru Akagunduz <ebru.akagunduz@gmail.com> writes:
> Should i do something for this patch?
>
> Thanks.

I think Greg scrapes the list, but I could be wrong... he's been busy,
so we may simply need patience.

Cheers,
Rusty.
Greg Kroah-Hartman Oct. 28, 2013, 9:10 p.m. UTC | #4
On Mon, Oct 28, 2013 at 01:46:47PM +1030, Rusty Russell wrote:
> Ebru Akagunduz <ebru.akagunduz@gmail.com> writes:
> > Should i do something for this patch?
> >
> > Thanks.
> 
> I think Greg scrapes the list, but I could be wrong... he's been busy,
> so we may simply need patience.

Greg was busy all last week at the Kernel Summit and LinuxCon and has
900+ patches in his todo-queue to dig through...

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c
index 28a4c4c..daf33fa 100644
--- a/drivers/staging/vt6656/aes_ccmp.c
+++ b/drivers/staging/vt6656/aes_ccmp.c
@@ -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;
@@ -218,7 +218,7 @@  void AESv128(u8 *key, u8 *data, u8 *ciphertext)
  *
  */
 
-bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize)
+static bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize)
 {
 	u8            abyNonce[13];
 	u8            MIC_IV[16];