Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: skein: fix sparse warning for static arrays

This patch fixes the following sparse warnings:

skein_iv.h:23:11: warning: symbol 'SKEIN_256_IV_128' was not declared. Should it be static?
skein_iv.h:31:11: warning: symbol 'SKEIN_256_IV_160' was not declared. Should it be static?
skein_iv.h:39:11: warning: symbol 'SKEIN_256_IV_224' was not declared. Should it be static?
skein_iv.h:47:11: warning: symbol 'SKEIN_256_IV_256' was not declared. Should it be static?
skein_iv.h:55:11: warning: symbol 'SKEIN_512_IV_128' was not declared. Should it be static?
skein_iv.h:67:11: warning: symbol 'SKEIN_512_IV_160' was not declared. Should it be static?
skein_iv.h:79:11: warning: symbol 'SKEIN_512_IV_224' was not declared. Should it be static?
skein_iv.h:91:11: warning: symbol 'SKEIN_512_IV_256' was not declared. Should it be static?
skein_iv.h:103:11: warning: symbol 'SKEIN_512_IV_384' was not declared. Should it be static?
skein_iv.h:115:11: warning: symbol 'SKEIN_512_IV_512' was not declared. Should it be static?
skein_iv.h:127:11: warning: symbol 'SKEIN_1024_IV_384' was not declared. Should it be static?
skein_iv.h:147:11: warning: symbol 'SKEIN_1024_IV_512' was not declared. Should it be static?
skein_iv.h:167:11: warning: symbol 'SKEIN_1024_IV_1024' was not declared. Should it be static?

by declaring the initialization vectors in question as static. The header
skein_iv.h is only included by skein.c

Signed-off-by: James A Shackleford <shack@linux.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

James A Shackleford and committed by
Greg Kroah-Hartman
df37d1ac 949c4ef0

+13 -13
+13 -13
drivers/staging/skein/skein_iv.h
··· 20 20 #define MK_64 SKEIN_MK_64 21 21 22 22 /* blkSize = 256 bits. hashSize = 128 bits */ 23 - const u64 SKEIN_256_IV_128[] = { 23 + static const u64 SKEIN_256_IV_128[] = { 24 24 MK_64(0xE1111906, 0x964D7260), 25 25 MK_64(0x883DAAA7, 0x7C8D811C), 26 26 MK_64(0x10080DF4, 0x91960F7A), ··· 28 28 }; 29 29 30 30 /* blkSize = 256 bits. hashSize = 160 bits */ 31 - const u64 SKEIN_256_IV_160[] = { 31 + static const u64 SKEIN_256_IV_160[] = { 32 32 MK_64(0x14202314, 0x72825E98), 33 33 MK_64(0x2AC4E9A2, 0x5A77E590), 34 34 MK_64(0xD47A5856, 0x8838D63E), ··· 36 36 }; 37 37 38 38 /* blkSize = 256 bits. hashSize = 224 bits */ 39 - const u64 SKEIN_256_IV_224[] = { 39 + static const u64 SKEIN_256_IV_224[] = { 40 40 MK_64(0xC6098A8C, 0x9AE5EA0B), 41 41 MK_64(0x876D5686, 0x08C5191C), 42 42 MK_64(0x99CB88D7, 0xD7F53884), ··· 44 44 }; 45 45 46 46 /* blkSize = 256 bits. hashSize = 256 bits */ 47 - const u64 SKEIN_256_IV_256[] = { 47 + static const u64 SKEIN_256_IV_256[] = { 48 48 MK_64(0xFC9DA860, 0xD048B449), 49 49 MK_64(0x2FCA6647, 0x9FA7D833), 50 50 MK_64(0xB33BC389, 0x6656840F), ··· 52 52 }; 53 53 54 54 /* blkSize = 512 bits. hashSize = 128 bits */ 55 - const u64 SKEIN_512_IV_128[] = { 55 + static const u64 SKEIN_512_IV_128[] = { 56 56 MK_64(0xA8BC7BF3, 0x6FBF9F52), 57 57 MK_64(0x1E9872CE, 0xBD1AF0AA), 58 58 MK_64(0x309B1790, 0xB32190D3), ··· 64 64 }; 65 65 66 66 /* blkSize = 512 bits. hashSize = 160 bits */ 67 - const u64 SKEIN_512_IV_160[] = { 67 + static const u64 SKEIN_512_IV_160[] = { 68 68 MK_64(0x28B81A2A, 0xE013BD91), 69 69 MK_64(0xC2F11668, 0xB5BDF78F), 70 70 MK_64(0x1760D8F3, 0xF6A56F12), ··· 76 76 }; 77 77 78 78 /* blkSize = 512 bits. hashSize = 224 bits */ 79 - const u64 SKEIN_512_IV_224[] = { 79 + static const u64 SKEIN_512_IV_224[] = { 80 80 MK_64(0xCCD06162, 0x48677224), 81 81 MK_64(0xCBA65CF3, 0xA92339EF), 82 82 MK_64(0x8CCD69D6, 0x52FF4B64), ··· 88 88 }; 89 89 90 90 /* blkSize = 512 bits. hashSize = 256 bits */ 91 - const u64 SKEIN_512_IV_256[] = { 91 + static const u64 SKEIN_512_IV_256[] = { 92 92 MK_64(0xCCD044A1, 0x2FDB3E13), 93 93 MK_64(0xE8359030, 0x1A79A9EB), 94 94 MK_64(0x55AEA061, 0x4F816E6F), ··· 100 100 }; 101 101 102 102 /* blkSize = 512 bits. hashSize = 384 bits */ 103 - const u64 SKEIN_512_IV_384[] = { 103 + static const u64 SKEIN_512_IV_384[] = { 104 104 MK_64(0xA3F6C6BF, 0x3A75EF5F), 105 105 MK_64(0xB0FEF9CC, 0xFD84FAA4), 106 106 MK_64(0x9D77DD66, 0x3D770CFE), ··· 112 112 }; 113 113 114 114 /* blkSize = 512 bits. hashSize = 512 bits */ 115 - const u64 SKEIN_512_IV_512[] = { 115 + static const u64 SKEIN_512_IV_512[] = { 116 116 MK_64(0x4903ADFF, 0x749C51CE), 117 117 MK_64(0x0D95DE39, 0x9746DF03), 118 118 MK_64(0x8FD19341, 0x27C79BCE), ··· 124 124 }; 125 125 126 126 /* blkSize = 1024 bits. hashSize = 384 bits */ 127 - const u64 SKEIN_1024_IV_384[] = { 127 + static const u64 SKEIN_1024_IV_384[] = { 128 128 MK_64(0x5102B6B8, 0xC1894A35), 129 129 MK_64(0xFEEBC9E3, 0xFE8AF11A), 130 130 MK_64(0x0C807F06, 0xE32BED71), ··· 144 144 }; 145 145 146 146 /* blkSize = 1024 bits. hashSize = 512 bits */ 147 - const u64 SKEIN_1024_IV_512[] = { 147 + static const u64 SKEIN_1024_IV_512[] = { 148 148 MK_64(0xCAEC0E5D, 0x7C1B1B18), 149 149 MK_64(0xA01B0E04, 0x5F03E802), 150 150 MK_64(0x33840451, 0xED912885), ··· 164 164 }; 165 165 166 166 /* blkSize = 1024 bits. hashSize = 1024 bits */ 167 - const u64 SKEIN_1024_IV_1024[] = { 167 + static const u64 SKEIN_1024_IV_1024[] = { 168 168 MK_64(0xD593DA07, 0x41E72355), 169 169 MK_64(0x15B5E511, 0xAC73E00C), 170 170 MK_64(0x5180E5AE, 0xBAF2C4F0),